Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Shader Graph / LWRP: PBR Shader breaks after making a Property with a float Default value

Discussion in 'Shaders' started by ryozombaku, Aug 21, 2018.

  1. ryozombaku

    ryozombaku

    Joined:
    Jun 24, 2017
    Posts:
    3
    I was trying Shader Graph in a test project and everything was working correctly. Then I transferred our main project to LWRP 3.0.0 and uploaded it to Git.
    When I started to build same shaders the way I did them in a test project my PBR shaders started to break when I was changing Color nodes to Properties. But everything works correctly on another PC with the same project downloaded from Git.

    Roadmap:
    1) Create a PBR Shader, open it
    2) Create a Color node
    3) Change Default color to other than system ones (not black, not red, but something in between)
    4) Convert to Property
    Immediately I get an error and a warning in a console:
    * Assertion failed on expression: 'success'
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    * Preview shader for graph has 2 errors:
    Shader compilation error in graph at line 5 (on ):
    Parse error: syntax error, unexpected ',', expecting ')'
    Shader compilation error in graph at line 73 (on d3d11):
    'TransformObjectToWorld': implicit truncation of vector type
    UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

    5) Save Asset
    After that there are 2 more errors in a console:
    * Assertion failed on expression: 'success'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    * Assertion failed on expression: 'success'
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)

    And also in the Inspector of the shader there is this error:
    * Shader is not supported on this GPU (none of subshaders/fallbacks are suitable)
    Note: shader is not breaking when the Color is a system one (eg: black or red)

    Again, everything works good on another PC and in another project.
    Can somebody help me to figure out how to fix this?

    Update: So, it seems that shader breaks if I create any property with not an integer value, even if it's a Vector1. But I still don't have a solution.
     
    Last edited: Aug 21, 2018
  2. ryozombaku

    ryozombaku

    Joined:
    Jun 24, 2017
    Posts:
    3
    Last edited: Aug 21, 2018
    eduroam and Immu like this.
  3. Milton_Touchdown

    Milton_Touchdown

    Joined:
    Apr 23, 2013
    Posts:
    1
    Same problem with Unity 2018.4.3f1. The shader break when i create vector1 property.