Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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.
     
  4. herrkjeldsen

    herrkjeldsen

    Joined:
    Nov 30, 2012
    Posts:
    8
    From what we can tell it appears we have the same issue in 2018.4.14f1
     
unityunity