Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Error with geometry shader for point topology on OSX + GLCore

Discussion in 'Shaders' started by da_abe, Jul 27, 2020.

  1. da_abe

    da_abe

    Joined:
    Feb 18, 2020
    Posts:
    2
    Hello there,

    I face some issue making a point geometry shader works in Unity on OSX:
    I have a component on a game object with mesh filter and renderer that generate a mesh with point topology and a bunch of vertices, nothing fancy here, then I have a shader with a geometry function using point topology, that function does nothing fancy except building a triangle around the vertex coordinates, but Unity always throw me a
    The given primitive topology does not match with the topology expected by the geometry shader 
    error.
    Sorry if the question was asked before but I apparently haven't found any recent and clear information on this during my research time.
    I've found that issue on the tracker that looks like the problem I'm facing, except it doesn't help at all given it was closed without any solution nor explanation.

    I was able to workaround that issue by building a mesh with triangles topology instead and build 3 triangles instead of one in my geometry function (that obviously now works on triangles instead) but I'm wondering whether it's something wrong with my mesh setup or if it's some known issue that is not made explicit in Unity documentation (docs only mention issues with shader level 5 on osx but geometry shaders should only be level 4 and thus fully available on macos openGL).
     
  2. aleksandrk

    aleksandrk

    Unity Technologies

    Joined:
    Jul 3, 2017
    Posts:
    2,864
    Hi!
    Do you mind submitting a bug report? We'll take a look.
     
  3. da_abe

    da_abe

    Joined:
    Feb 18, 2020
    Posts:
    2
    aleksandrk likes this.
  4. jaspertucker

    jaspertucker

    Joined:
    May 21, 2020
    Posts:
    2
    Has there been a fix for this?
     
  5. titasortas

    titasortas

    Joined:
    Jan 28, 2022
    Posts:
    1
    Came across the same problem
    Seams unity wont fix this:
    "Closing older low priority bugs that have not increased in user pain and are not blocking for users shipping projects."

    Since I was forced to work with three points at a time (instead of one) I just tripled the work the geometry function will do.
    So the end result is the same with little change to code.

    Still it would be nice to get support for this since the geometry function is limited in how much data it will output at a time.