Search Issue Tracker
By Design
Votes
0
Found in [Package]
5.2.3
Issue ID
1154299
Regression
No
[HDRP] Incorrect sorting of transparent merged objects using HDRP lit shader.
How to reproduce:
1) Open attached project HDRPTest.zip
2) Open SampleScene scene
3) Make sure that HDRPTestMat has Surface Type set to Transparent, Blending Mode set to Alpha and Alpha value in Base Color set to 255
4) Move the camera to observe boxArrayMerged object
Expected result:
Correct sorting of transparent objects.
Actual result:
Objects showed in incorrect order. Smaller boxes appear above the big box.
Reproducible with: 2019.3.0a2
Reproducible with package version: 5.2.3, 6.5.3
Note: Doesn't happen if you keep all 3D meshes as separate objects (can be seen on boxArray example object).
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
- UI Text color is incorrect when text is rendered on SubMeshUI
- "Invalid SortingGroup index set in Renderer" errors when making many modifications in same frame
- Crash on GizmoBufferSizeHistory::GetBuffer() when opening a specific scene
- RenderTexture is not initialized when it is set as Material's Texture
- Branch node outputs a random value instead of a constant on the false conditon
Resolution Note:
This is how transparent sorting works:
- In transparent mode, objects are drawn from back to front order (explains the proper rendering of the individual cubes)
- Then the triangles are drawn in the order they are stored in the mesh data (that why you see the small cube overlaying the big one)
- But you can enable the "Transparent Depth Prepass" toggle in the material to do first a depth pass (like an opaque), and then the triangles are tested against this value, culling triangles "behind"