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
- Lights with Cookies generate Cookie Atlas and increase Memory usage every time when Play mode is entered
- Crash on mono_traverse_object_internal when exiting Play mode on a specific project
- Camera prefab shows up in overrides after upgrade when game view is changed to Simulator
- Prefab Override context menu does not appear when changing attributes on a Terrain Component
- Particles are visible through Mesh when Sprite-Lit-Default Material is used
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"