Search Unity

Geometry Shader on OSX

Discussion in 'Shaders' started by vladstorm_, Apr 3, 2016.

  1. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    Hi,

    How to write geometry shaders under OSX? Is it even possible?
    I have code with a geometry shader which works on my OSX system but its written in openframeworks.
    I wanna find out how to make the same thing in unity.

    Basically I just have to draw some lines on GPU but I have to process them with geometry shader first.
    How to pass a set of vertices to a geometry shader as lines?

    I only found a way with Material.SetBuffer and then using StructuredBuffer inside shader - but it seems it doesnt work under OSX.
     
  2. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    ok ... it actually works on OSX. but ComputeShaders dont. thank you Apple
     
  3. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    @Horz hi, could you please show me how you did it, i keep getting a pipeline error when trying to run a geometry shader on my mac.
    Metal: Error creating pipeline state (Custom/Geom_Grass): Vertex attribute POSITION0(0) is missing from the vertex descriptor
    with every single one i write i get this, while they all work on PC...?
     
  4. vladstorm_

    vladstorm_

    Joined:
    Nov 26, 2013
    Posts:
    184
    @jister i didnt have this. i doubt its related to osx. did u try to add position attribute?