Search Issue Tracker
Won't Fix
Votes
1
Found in
2021.3.40f1
2022.3.38f1
6000.0.10f1
Issue ID
UUM-76474
Regression
No
Shadow artifacts are present when Directional Light is at a certain angle and with low Bias
How to reproduce:
1. Open the “Test Project.zip“ project
2. Open the “SampleScene“
3. Select the “Directional Light” in Hierarchy
4. Increase the Intensity to “1.5“ (to make the artifacts more visible) in Inspector
5. Observe the Game view
Expected result: The Cube GameObject’s shadow is uniform on one side
Actual result: The Cube GameObject’s shadow starts with an offset on one side
Reproducible in: 2021.3.40f1, 2022.3.38f1, 6000.0.10f1
Reproduced on: Windows 11 Pro (23H2)
Not reproduced on: No other environment tested
Notes:
- The scale of the artifacts changes on the size of the Game view (especially when it is in a 16:9 aspect ratio)
- Altering Directional Light Shadow attributes (under “Shadow Type”) will change the visibility and scale of the issue
Comments (1)
-
Lex4art
Aug 27, 2024 15:06
Actual! My asset pack ("Uniblocks" - https://assetstore.unity.com/packages/3d/props/uniblocks-hdrp-288750 ) is all about making buildings by seamlessly stacking many different blocks, and those shadow artifacts appears along each block in URP/BiRP, preventing me to releasing for those RPs. So far only Unity 6 preview HDRP is free from this issue...
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
- PlayerPrefs get corrupted when a minimized fullscreen Player is closed through the Taskbar
- "To Debug, run app with -diag-job-temp-memory-leak-validation cmd line argument. This will output the callstacks of the leaked allocations." warning is printed when JobTempMemoryLeakValidation switch is enabled
- Main Thread stalling when loading Audio Source asset asynchronously while preloading another Audio Source asset
- Material artifacts occur in the Material Preview window when baked lighting is applied to scenes
- “ArgumentOutOfRangeException” after saving, reseting and re-add Default Tile Palette Tools to the list in Preferences window
Resolution Note:
Hello,
After reviewing the issue, it seems it is not a bug.
The artifact that occurs when using Shadow Map is called shadow acne.
Shadow acne: https://computergraphics.stackexchange.com/questions/2192/cause-of-shadow-acne
Shadow acne happens because continuous spatial information (like shadows) is stored in a discrete medium (like a texture), which causes discrepancies when this stored data is retrieved.
As a result, Shadow Map cannot avoid shadow acne, and the solution for this is bias.
Therefore, it is natural for acne to appear more prominently with a low bias.
Additionally, in the current built-in shader, both the (cascaded) shadow map and the screen space shadow are enabled by default.
Since the screen space shadow functionality also uses a texture, artifacts become more noticeable compared to when only the shadow map is used.
If you opt to use only the shadow map without the screen space shadow functionality, you may reduce the artifacts slightly with the same bias setting.
Here is how you can disable the screen space shadow feature and use only the shadow map with the current built-in shader:
1) Project Settings > Graphics > Built-in Shader Settings > Screen Space Shadow: Built-in shader -> No Support
2) Project Settings > Graphics > Tier Settings > Cascaded Shadows: disable
Please feel free to contact us if you have any further issues.