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
- Texture Import Warnings are obscured by other Terrain Layer options in the Inspector
- Active Targets section text in Graph Inspector is truncated despite available space
- Burst Inspector middle divider is jittering when resized with the Burst Inspector window docked
- Shader Graph Node information is briefly displayed in Graph Inspector when clicking on Category in the Blackboard
- JsonConvert conversion fails trying to call GetCallbackMethodsForType when [OnDeserialized] is used in a class
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"