Skip to content

Transparency ordering #10

@ProfLander

Description

@ProfLander
  • 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions