Search Issue Tracker
Won't Fix
Fixed in 2019.4.X
Votes
9
Found in
2019.3.0f3
2019.4.25f1
Issue ID
1336184
Regression
No
[BiRP/URP] Game Object with Cast Shadows type set to Shadows Only flickers when illuminated by a Spotlight
How to reproduce:
1. Open the user's attached "CommandBuffer.zip" project
2. Open the "SampleScene" Scene
3. Enter Play Mode
4. Move the Camera with WASD keys away from the Cube GameObjects
5. Observe the OnlyShadows Game Object
Expected result: No flicker happens, Spotlight properly cast shadows
Actual result: "OnlyShadows" GameObject starts flickering, all shadow casting objects does not cast shadows from the Spotlight
Reproduces in URP.
Reproducible with: 2019.3.0f3, 2019.4.26f1, 2020.3.9f1, 2021.1.8f1, 2021.2.0a17
Not reproducible with: 2018.4.35f1, 2019.3.0f1, 2019.3.0f2
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
- Physics.IgnoreCollision method does not work when used on a disabled GameObject
- Empty data buffer gets passed to OnAudioFilterRead when using Video Player
- The Update() method gets called on a disabled script when added and disabled during runtime
- URP Decal instanced rendering breaks and spams warnings when it is enabled at runtime
- Ligtmaps disappear when entering the Play Mode
Resolution Note (2021.2.X):
After investigations, we believe this is related to a numerical precision issue that normally happens in render pipelines at a distance far enough from the camera or the light.
The workaround is to try and adjust the scale of your scene such that your objects are under 1000 units of distance from the camera or lights. E.g. consider 1000 units of the 3d space means 1km or adjust depending on your scenario.
Directional light to model sunlight can also be used (as it should not suffer from this problem), and other types of lights for more local illumination at close distances should be used.