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
- [Mobile] Developer Console does not appear when an error is thrown
- [HDRP] Game view renders artifacts when Camera's Component "Post Anti-aliasing" is set to "TAA" and Dynamic Resolution's "Forced Screen Percentage" is changed
- A deactivated Prefab's name color becomes white when a GameObject in the scene is deactivated
- The Game view becomes blank when using Frame Debugger with MSAA and Texture binding enabled in Play Mode
- NullReferenceException is thrown when changing the Inspector preview selection
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"