Skip to main content

Module transform3d

Module transform3d 

Source
Expand description

Render-world plumbing for the composite quad’s per-layer uniforms: the 3D model matrix and the screen-space clip rect (transform3d support).

Every drawn composite quad gets one CompositeUniforms entry — identity matrix + open clip for untransformed layers — so composite.wgsl stays single-path. The lifecycle mirrors FilterUniforms: a DynamicUniformBuffer staged in prepare_layer_composites, the per-quad offset riding LayerCompositeBatch, and one whole-buffer bind group bound at a dynamic offset by SetCompositeUniforms.

Structs§

CompositeUniforms
Per-quad composite params. Field order matches CompositeParams in composite.wgsl byte for byte (128 bytes; guarded by composite_uniforms_match_the_documented_wgsl_layout). Pad names are digit-free on purpose (the naga-namer constraint, see FilterUniforms).
CompositeUniformsMeta
Frame-staged composite uniforms + their whole-buffer bind group (rebuilt every frame after write_buffer — the buffer may reallocate).
SetCompositeUniforms
Binds the composite-uniform bind group at the quad’s dynamic offset (staged by prepare_layer_composites on [LayerCompositeBatch]).

Functions§

open_clip
The clip sentinel: an interval no on-screen fragment escapes, making the fragment test a no-op for quads clipped on the CPU (or not clipped at all).