Unity Issue Tracker - Custom Shadows stay soft when the "Soft Shadows" option is disabled in the "URP Renderer" asset
Closed
UUM-65869
Custom Shadows stay soft when the "Soft Shadows" option is disabled in the "URP Renderer" asset
Unity: Shadows/Lights
Won't Fix
6.0.X
2023.3.X
2023.3.0a2 onwards
2022.3.X
2022.3.11f1 onwards
The issue is that the Custom Soft Shadow keywords set in the ShaderGraph do not have a variant for when soft shadows are disabled.
Adding another value, at the top, to the keyword enum solves the issue.
How to reproduce:
1. Open the “IN_70220” project
2. Open the “AdditionalLightsDemoScene”
3. In the Project window search for the “URP Renderer“ asset and open it
4. In the Inspector disable “Soft Shadows”
5. Observe the Game view
Expected result: Hard shadows rendered
Actual result: Soft shadows rendered
Reproducible with: 2022.3.11f1, 2022.3.21f1, 2023.3.0b10
Not reproducible with: 2021.3.36f1, 2022.3.10f1
Couldn’t test with: 2023.2.13f1 (due to shader error and custom material being pink)
Reproducible on: Windows 10 Pro
Not reproducible on: No other environments tested
Notes:
Reproducible on both Vulkan and OpenGLES3 Graphics API
I made some modifications for the user project so the expected result can be seen by toggling the “Button” in the Play Mode
This issue is not reproducible if the Soft shadows are changed to Hard shadows in the code (I created the variable “private Light shadowCastingLight;“ and changed shadows with this: “shadowCastingLight.shadows = LightShadows.Soft;“).
Reproducible when Windows Standalone or Android Platforms are selected (no other environment tested)
Couldn’t test in Windows Standalone and Android Player due to texture becoming pink color
Prioritise and Follow this issue
Have a workaround or additional info about this issue?