Search Issue Tracker
By Design
Votes
0
Found in
2017.4.0f1
2017.4.30f1
2018.4.0f1
2019.2.0a1
2019.3.0a1
2020.1.0a1
Issue ID
1183527
Regression
No
Depth buffer rendering skybox incorrectly
How to reproduce:
1. Open the attached project
2. Open the "SetMatrixArrayBug.unity" scene
3. Check how Quad is rendered in the Game view
Actual result: Quad is rendered over the cube, but not over the skybox. (screenshot attached)
Expected result: Skybox should always be rendered behind everything else.
Reproducible with: 2017.4.32f1, 2018.4.8f1, 2019.2.5f1, 2019.3.0b3, 2020.1.0a4.
Notes:
- Changing camera "Clear Flags" mode to anything else causes the quad to render correctly.
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
- Global Volume visual details are blurred when Tonemapping mode is set to any other than 'ACES'
- [Android] Stage information is not logged when Log Shader Compilation is enabled
- [Vulkan] The memory allocation increases rapidly when there are multiple (three or more) Real-Time Reflection Probes in the Scene
- [macOS] Library folder of the opened project can be deleted which leads to the crash
- “Default Scene” dropdown field contains a spelling mistake “Default Builtin”
Resolution Note (2019.3.X):
The shader for the skybox indeed has a render queue of 1000.
But, this is not used in the game view window, as described by the documentation here: https://docs.unity3d.com/Manual/SL-SubShaderTags.html
"Queues up to 2500 (“Geometry+500”) are consided “opaque” [...] Skyboxes are drawn in between all opaque and all transparent objects."
Possible solutions to ensure drawing over skybox are:
- use ZWrite On with ZTest Always in the shader
- or specify render queue 2501 or more.