Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Shader Graph nodes not working on all Android devices

Discussion in 'Shader Graph' started by SeriouslyNot, Jul 9, 2020.

  1. SeriouslyNot

    SeriouslyNot

    Joined:
    Nov 24, 2017
    Posts:
    121
    Is there a way to check by code if the device is able to render a shader graph containing let's say a Voronoi node?

    My shader has a voronoi node, it works on my Samsung S9 but not on Samsung A5.

    How can i check by code so i can switch to another cheaper shader that can run on devices that don't support those nodes?

    It would be very helpful if Unity could put a Node Description in each node's Docs to know how to check for device's support for them. Maybe depending on SystemInfo.graphicsShaderLevel ?

    Any pointers?
     
  2. adamgolden

    adamgolden

    Joined:
    Jun 17, 2019
    Posts:
    1,549
    You can sort of check like this:
    Code (CSharp):
    1. bool veryOld = (SystemInfo.graphicsDeviceType == GraphicsDeviceType.OpenGLES2);
     
    saskenergy likes this.
  3. SeriouslyNot

    SeriouslyNot

    Joined:
    Nov 24, 2017
    Posts:
    121
    I avoided Voronoi node and used a workaround to achieve the same effect.

    Voronoi nodes are very expensive. A lot of math.
     
    saskenergy likes this.
  4. Oberheim

    Oberheim

    Joined:
    Jun 4, 2020
    Posts:
    24
    Hi all !

    Digging this thread... I am having an issue with a part of my shader graph that never works on mobile but does in the editor.... it seems simple though, so I really can't get my head around why this doesnt work on mobile....
    I'm attaching a screenshot of that part of the Shader Graph.
    Pleassse help :)
    Much Love
    O.

    P.S: It's a shader that twists object along an axis, to make it looks like a coridor.
    PS2: Using URP.
     

    Attached Files: