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
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.