Search Issue Tracker
Won't Fix
Votes
4
Found in
2021.3.37f1
2022.3.23f1
2023.2.17f1
6000.0.0b14
Issue ID
UUM-68388
Regression
No
Shadow flickering occurs when 16:10 aspect ratio is enabled and the "Rendering Path" is set to "Deferred"
Reproduction steps:
1. Open the “repro_IN-72649“ project
2. Open the “/Assets/Scenes/SampleScene.unity”
3. In the “/Assets/Settings/URP-HighFidelity-Renderer.asset“, select “Deferred“ in the “Rendering → Rendering Path“ parameter
4. Enter the Play Mode
5. In the Game view, select the “16:10 Aspect” aspect ratio
6. Observe the Game view
Expected result: The game displays without any issues
Actual result: There’s a visible shadow flickering on the “Cube“ GameObject
Reproducible with: 2021.3.37f1, 2022.3.23f1, 2023.2.17f1, 6000.0.0b14
Reproducible on: Windows 11 (10.0.22621) (user’s), Windows 10 (22H2)
Not reproducible on: No other environments tested
Notes:
* Reproducible in Player when built with 16:10 aspect ratio (tested with “Windowed”, 1280x800) set in the Player Settings
* Setting the aspect ratio as any other fixes the flickering
-
Gasimo
Apr 04, 2024 07:24
Happens on my 1980x1200 as well. For anyone searching, here is a forum thread for this issue:
https://forum.unity.com/threads/deferred-rendering-shadow-flickering-urp-unity-2023-2-5f1.1570864/ -
StephenManaWorks
Apr 03, 2024 00:02
I can still replicate this bug with 16:9, but it was more difficult to find a camera angle to trigger it. Try adjusting the Oscillate Transform component on the Main Camera to rotate between Min: 5 and Max: -20 around the X axis when running 16:9.
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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
Resolution Note:
This issue seems to be related to floating point precision issues when camera is far from the world origin. In deferred rendering mode the screen pos + depth is converted to world space and further transformed for shadow mapping which suffers from floating point precision issues when camera is far from the world origin (e.g. camera is at [495, 1.5, -495] in the repro sample). In HDRP this is addressed with "camera-relative rendering" but URP doesn't have this option. For example when expanding the plane ("Cube" object) scale from [1000, 1, 1000] to [1100, 1, 1100] the artifact goes away but there's quite evident shadow jittering from the shadow casting cube on the plane, which is indication of the float precision issue. Also, further debugging this issue the depth differences are quite minor in the artifact area between shadow map and pixel coordinates projected to the shadow map depth. We'll need to implement camera-relative rendering in URP to fix this issue.