Description
Currently, transparency ordering is only correct versus other instances with the
same mesh within the same batch
This is down to sorting each batch into contiguous blocks of a given mesh,
then sorting the instances in those blocks by depth
It's fundamentally more performant due to scaling by O(mesh_count) calls,
but also fundamentally incorrect w.r.t. transparency ordering
Correctness requires that depth supercedes mesh for sorting purposes
Batches could be sorted by depth, and then a series of indirect draw calls
could be generated for each contiguous block of a given mesh
However, is this worth it given that transparency ordering cannot take place across different batches?
With this context, order-independence is the only truly correct solution
Intuition says favour performance for now and document technicalities around instanced draw order
Mesh / Material key types can control ordering at the type level for user control
Only affects transparent objects
Extra complexity not worth it for correctness within the same material, but incorrectness vs others
Reactions are currently unavailable
You can’t perform that action at this time.
same mesh within the same batch
then sorting the instances in those blocks by depth
but also fundamentally incorrect w.r.t. transparency ordering
could be generated for each contiguous block of a given mesh