Search Unity

  1. We are migrating the Unity Forums to Unity Discussions by the end of July. Read our announcement for more information and let us know if you have any questions.
    Dismiss Notice
  2. Dismiss Notice

Bug Graphics.DrawMeshInstanced with shadergraph shader does not show in standalone.

Discussion in 'Shaders' started by joska, Feb 17, 2022.

  1. joska

    joska

    Joined:
    Feb 1, 2015
    Posts:
    9
    I have been running into the issue of shadergraph shader not showing when in a standalone build. They do however show in editor. The meshes do show in standalone when a standard URP lit material is applied.

    Things i have tested but did not fix the issue:

    - Enabled GPU instancing on the materials.
    - In project settings i added the shader to always included shaders.
    - change the project settings shader stripping to keep all variations

    It seems like something in the shadergraph shader is not compatible with instancing.
    Would be great to know if anyone managed to fix or found a solution to this issue.

    Code (CSharp):
    1. Graphics.DrawMeshInstanced(drawSector.grassType.mesh , 0 , drawSector.grassType.material , drawSector.matrices);
     
  2. baroncocktail

    baroncocktail

    Joined:
    Jan 9, 2014
    Posts:
    2
    I'm having the exact same issue with Unity 2021.2.10f1

    Did you find a solution to your problem?
     
    lemapp likes this.