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
- Too little validation messages in the "WebAssembly Language Features" Memory settings
- Project Settings Search Highlights are misaligned when using the Bitmap Text Rendering Mode
- "GetControlID at event ValidateCommand returns a controlID different from the one in Layout event" Warning is thrown when undoing the deletion of Sprite Shape Profile
- Memory related fields in the "WebAssembly Language Features" can be set to the negative numbers
- "WebAssembly Language Features" Header in the Player Settings has a smaller indentation
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"