using AcDream.App.Rendering.Gpu; using AcDream.Core.Meshing; using DatReaderWriter.Enums; namespace AcDream.App.Rendering.Wb; /// /// Bucket identity for 's per-frame group dictionary. /// Two (entity, batch) pairs that share the same render /// in a single glMultiDrawElementsIndirect draw command. Promoted to /// internal at file scope (was a private nested type) so /// can store it inside /// without depending on dispatcher internals. /// /// Campaign V slice V4t replaced the raw 64-bit /// ARB_bindless_texture handle with . The /// substitution is a bijection — the device interns one slot per resident /// handle — so exactly the same (entity, batch) pairs bucket together as /// before, which is the property that keeps submission order identical. This /// key's VALUE never orders anything: groups are enumerated in the dictionary's /// insertion order and sorted by cull mode then camera distance /// (CompareOpaqueSubmissionOrder / CompareTransparentSubmissionOrder), /// and the delayed-alpha path sorts by viewer distance then submission ordinal. /// The key reaches only equality, hashing, and the scene-digest fingerprints. /// internal readonly record struct GroupKey( uint FirstIndex, int BaseVertex, int IndexCount, GpuTextureSlot TextureSlot, uint TextureLayer, TranslucencyKind Translucency, CullMode CullMode = CullMode.CounterClockwise);