pub struct BatchInfo {
pub start_rank: usize,
pub count: usize,
pub texture_hash: u32,
pub blend_type: BlendType,
pub kind: DrawBatchKind,
pub stencil: StencilTest,
pub mask_seq: u32,
pub alpha: f32,
pub tint: u32,
}Expand description
The fields of one DrawBatch the renderer needs, extracted by the caller so
the operation layer keeps ownership of batch iteration.
Fields§
§start_rank: usize§count: usize§texture_hash: u32§blend_type: BlendType§kind: DrawBatchKind§stencil: StencilTestStencil test to apply (masked content). None for ordinary content.
mask_seq: u32The part’s place on its player’s tree sequence — every part of the
instance tree numbered in drawing order, a sub-animation in its instance
part’s place. What the coverage replay scopes writers against; read only
for a masked target (count == 1) under MaskBackend::Coverage.
alpha: f32Player-level alpha, folded into every vertex’s colour alpha.
The shader’s final coverage is tex.a * color.a and the blend table is
premultiplied throughout, so a plain multiply here fades the part
correctly under every blend mode (including Add / Mul, which reach dst
unchanged at alpha 0). Mask writers are deliberately not faded — their
color[0] carries the cutout threshold, not a colour.
tint: u32Player-level tint, multiplied into the fragment after the PartsColor
mix — the place uColor lands in the WebGL player, and the reason it
cannot fold into the vertex colour the formula blends towards. Packed in
the unpack4x8unorm byte order (red in byte 0); white, 0x00FF_FFFF,
leaves the colour alone. Mask writers are untinted for the same reason
they are unfaded.