Search Issue Tracker
By Design
Votes
0
Found in
2021.3.26f1
2022.2.21f1
2022.3.0f1
2023.1.0b19
2023.2.0a17
Issue ID
UUM-37541
Regression
No
Artifacts are visible when using the depth buffer projection with MSAA and Depth Priming
Reproduction steps:
1. Open the attached “ASDQWE” project
2. Open the “Assets/Scenes/SampeScene.unity” Scene
3. Enter the Play Mode
4. Observe the Game View
Expected result: The red square looks constantly the same
Actual result: The red square contains artifacts when the camera moves closer to it and when it moves away - the square becomes semi-transparent
Reproducible with: 2021.3.26f1, 2022.2.21f1, 2022.3.0f1, 2023.1.0b19, 2023.2.0a17
Could not test with: 2020.3.48f1 (Assets could not migrate correctly)
Reproducible on: Intel MacOS 13.3.1
Note: For the reproduction to occur these settings need to be enabled:
- In the “Assets/Settings/URP-Balanced.asset” asset, Quality > Anti Aliasing (MSAA) > 2x (or greater)
- In the “Assets/Settings/URP-Balanced-Renderer.asset” asset, Rendering > Depth Priming Mode > Forced (or auto)
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
- “Remove Unused Overrides” available on not loaded Scene and throws “ArgumentException: The scene is not loaded” warning
- Adaptive Probe Volume occlusion edge is calculated incorrectly when viewing probes near geometry edges
- Sampling a texture using an HLSL file throws shader errors and the code does not compile
- "Graphics.CopyTexture called with null source texture" error when Base Camera of an Overlay Camera is removed with DX11 Graphics API and Compatibility Mode enabled
- WebGL sends wrong value with large numbers when SendMessage function is used
Resolution Note:
Enabling depth priming, causes the opaque pass to reuse the depth from the depth prepass and override all the opaque objects depth states to Equal (from LessEqual) in order to be able to reuse the existing depth texture as depth buffer. So your decal depth "always" op is overridden by "equal" which causes z-fighting.
If you need to use depth priming, you should move your material to the transparent queue, that will make sure that depth priming opaque pass depthOp override doesn't affect your material.
If you enabled depth priming just as a way to force a depth prepass, there is a better and cheaper (perf wise) way of doing that: in URP asset enable "Depth Texture", in the URP Renderer Data set "Depth Texture Mode" to "Force Prepass", this will still run a depth prepass but the depth state of your custom material will be preserved