Search Issue Tracker
Won't Fix
Won't Fix in 2023.2.X
Votes
0
Found in
2023.1.0b19
2023.2.0a17
Issue ID
UUM-37080
Regression
No
Some shadows rendered in Editor are not rendered when in Player
How to reproduce:
1. Open the “shadow_repro“ project
2. Look around the scene and observe the shadows
3. Build and Run
4. Observe the shadows in the Player
Expected result: Scene looks the same in Editor and Player
Actual result: Scene is missing some shadows in the in Player (image attached)
Reproducible with: 2023.1.0b19, 2023.2.0a17
Could not test with: 2021.3.26f1, 2022.3.0f1 (errors)
Reproducible on: Windows 10
Note: Only reproducible in Player
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:
The problem is that the keywords for MainLight Shadows, in the ToonShading subgraph, are incorrectly set up. They are currently set up as two separate shader features, one for MAIN_LIGHT_SHADOWS and another for MAIN_LIGHT_SHADOWS_CASCADES. These need to be removed.
Then an enum keyword needs to be added to the subgraph, set as a multi_compile with _MAIN_LIGHT as the reference value. Then the three enum values should be OFF, SHADOWS and SHADOWS_CASCADES. With that you have made an identical keyword structure (except for Screen Space Shadows) to the ones used in URP's Shaders.
There is also an issue in the Toon shadergraph, used in the project, with how shadows are being calculated. Using a default URP Lit or a Lit ShaderGraph does not produce the same issues.
Resolution Note (2023.2.X):
The problem is that the keywords for MainLight Shadows, in the ToonShading subgraph, are incorrectly set up. They are currently set up as two separate shader features, one for MAIN_LIGHT_SHADOWS and another for MAIN_LIGHT_SHADOWS_CASCADES. These need to be removed.
Then an enum keyword needs to be added to the subgraph, set as a multi_compile with _MAIN_LIGHT as the reference value. Then the three enum values should be OFF, SHADOWS and SHADOWS_CASCADES. With that you have made an identical keyword structure (except for Screen Space Shadows) to the ones used in URP's Shaders.
There is also an issue in the Toon shadergraph, used in the project, with how shadows are being calculated. Using a default URP Lit or a Lit ShaderGraph does not produce the same issues.