Search Issue Tracker

By Design

Votes

0

Found in

2021.3.39f1

2022.3.32f1

6000.0.5f1

Issue ID

UUM-73623

Regression

No

"Shader.EnableKeyword" does not affect the shader when its keyword value is larger than the enum value set on the material

--

-

How to reproduce:
1. Open the “TestShaderGraphMultiCompileKeyword“ project
2. Open the “SampleScene“
3. Open the “Shader Graphs_MultiCompileShader“ material in the Inspector
4. Set the “BaseColorMode“ property to “Red“
5. Open the “Custom Camera (Global keyword)“ GameObject in the Inspector
6. Set the “Base Color“ property to “BASECOLORMODE_BLUE“
7. Observe the Game view

Expected result: The smaller cube is blue
Actual result: The smaller cube is red

Reproducible with: 2021.3.39f1, 2022.3.32f1, 6000.0.5f1

Reproducible on: macOS 13.5.2 (Intel), Windows 11 (User’s)
Not reproducible on: No other environments tested

Note: It seems that the “BaseColorMode“ has a hierarchical priority, or the “Base Color“ only comes into affect if it is higher in the list than the place of the “BaseColorMode“ chosen element

  1. Resolution Note:

    When the material and the global state both enable a keyword from the same keyword list, it ends up trying to select a non-existing variant.
    When this happens, some close enough variant gets picked.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.