The vertex-buffer layout of one batched draw: the planner's interleaved
stream — position, then uv when the stream carries it, then colour — as
one buffer in slot 0, against the shader locations the unlit family
names (wgpu-unlit.ts: locations are names, slots are positional).
streamUvs/streamColors describe what the stream contains (they fix the
stride and the offsets); readUvs/readColors describe what the variant
reads (they decide which attributes are declared). The two can differ in
exactly one direction: an unlit batch whose named texture fails to resolve
draws untextured through a variant that reads no uv, over a stream that
still interleaves them — WebGPU permits a buffer byte range no attribute
names, so the uv floats are simply strided over, which is this backend's
spelling of gl-batch.ts's "an unlit batch draws on untextured instead".
The renderer never asks for the other direction (an attribute the stream
does not contain would read past the vertex).
The vertex-buffer layout of one batched draw: the planner's interleaved stream — position, then uv when the stream carries it, then colour — as one buffer in slot 0, against the shader locations the unlit family names (
wgpu-unlit.ts: locations are names, slots are positional).streamUvs/streamColorsdescribe what the stream contains (they fix the stride and the offsets);readUvs/readColorsdescribe what the variant reads (they decide which attributes are declared). The two can differ in exactly one direction: an unlit batch whose named texture fails to resolve draws untextured through a variant that reads no uv, over a stream that still interleaves them — WebGPU permits a buffer byte range no attribute names, so the uv floats are simply strided over, which is this backend's spelling ofgl-batch.ts's "an unlit batch draws on untextured instead". The renderer never asks for the other direction (an attribute the stream does not contain would read past the vertex).