Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Bug (Case 1198492) Shader variant only used in nested shader with local keyword is stripped

Discussion in '2019.3 Beta' started by Kichang-Kim, Nov 20, 2019.

  1. Kichang-Kim

    Kichang-Kim

    Joined:
    Oct 19, 2010
    Posts:
    1,012
    Hi. I found that the shader variant with shader_feature_local keyword in nested shader is stripped in player build. In editor, it works and shows correct result.

    Here is example shader dependency:
    MaterialA using ShaderA with enabled keyword "_MY_VARIANT"
    ^
    ShaderA uses pass of ShaderB
    ^
    ShaderB with shader_feature_local "_MY_VARIANT"

    Minimal reproducible project was sent as Case 1198492 and Unity said that they was able to reproduce.
     
    Peter77 likes this.
  2. LeonhardP

    LeonhardP

    Unity Technologies

    Joined:
    Jul 4, 2016
    Posts:
    3,136