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
- GameObjects change Hierarchy order when undoing adding Component to multiple GameObjectsGameObjects change Hierarchy order when undoing adding Component to multiple GameObjects
- [macOS] Editor crashes after entering Play mode with overlapping GameObjects with Cloth Component and Cloth Inter-Collision enabled
- Look Dev constantly regenerates the default Volume Profile when set to "None" instead of using the default one
- Look Dev errors are spammed when opening a new HDRP project when Look Dev was added to the layout in the previous project
- URP Scene Templates are not editable when first opened from the New Scene dialog
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.