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
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- [WebGPU] error with compute shader and read-only RWTexture
- Capacity-size memory is copied instead of Length-size when using UnsafeUtility.memCpy()
- Console displays "SerializedObjectNotCreatableException: Object at index 0 is null" error during Unity theme change while "Tile Palette" window is opened
- Details are not shown when Error Message is still selected after changing Log Entry Count in the Console
- Disabling Unity VCS in Project Settings unfocuses the Project Settings Window
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.