Search Issue Tracker
By Design
By Design in 2022.2.X
Votes
7
Found in
2021.3.2f1
2022.1.1f1
2022.2.0a12
Issue ID
UUM-9590
Regression
No
[URP] ShaderKeywords '_MAIN_LIGHT_SHADOWS' and '_ADDITIONAL_LIGHT_SHADOWS' are always enabled in the Editor
ShaderKeywords '_MAIN_LIGHT_SHADOWS' and '_ADDITIONAL_LIGHT_SHADOWS' are enabled in the Editor when the 'Main Light' and 'Additional Lights' are disabled in the Universal Render Pipeline Asset
Reproduction steps:
1. Open the attached 'URP_EditorKeywordBug' project
2. Open the 'SampleScene'
3. Go to the 'Window -> Analysis -> Frame Debugger' and toggle the 'Enable' button on
4. Select the 'Draw Opaque Objects' draw call
Expected result: '_MAIN_LIGHT_SHADOWS' and '_ADDITIONAL_LIGHT_SHADOWS' ShaderKeywords are disabled
Actual result: ShaderKeywords '_MAIN_LIGHT_SHADOWS' and '_ADDITIONAL_LIGHT_SHADOWS' are present
Reproducible with: 12.1.6 (2021.3.2f1), 13.1.8 (2022.1.1f1), 14.0.2 (2022.2.0a12)
Could not test with: 2019.4.39f1, 2020.3.34f1 (no 'Draw Opaque Objects' draw call)
Note:
- Issue is not reproducible in builds
Comments (2)
-
unity_F74167AD32862B410F49
Jan 18, 2023 09:43
So this means that you can't test what your game looks like in editor with main light shadows disabled, nor any shaders that change when the main light shadow is disabled.
You'd need to make a build everytime, which for larger games is very annoying.
-
pmerilainen
Nov 04, 2022 08:36
This seems to happen also in deployed Android builds using Vulkan
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
This is by design. To reduce the amount of variants to process when making builds, URP strips out the "off"variant for main and additional light shadows, the behaviour in the editor mimics that.
Work is planned to improve shadows in URP and this behaviour will be reevaluated.
Resolution Note (2022.2.X):
This is by design. To reduce the amount of variants to process when making builds, URP strips out the "off"variant for main and additional light shadows, the behaviour in the editor mimics that.
Work is planned to improve shadows in URP and this behaviour will be reevaluated.