Expand description
The camera blocks: what the forward pass and the G-buffer pre-pass need to place a fragment, and the per-draw model pair the pre-pass differentiates for motion vectors.
Structsยง
- GBuffer
Model - Per-draw model matrices for the G-buffer pre-pass. Matches
GbModelinshaders/gbuffer_prepass.slang, which Metal and DirectX bind as a constant buffer; Vulkan carries the same pair plus the roughness in one push-constant block (vulkan::uniforms::GbModelPush), because a pipeline layout may declare only one. For a static or skinned object with no motion the caller setsprev == cur. - GBuffer
View - Per-frame view inputs to the unified G-buffer pre-pass. The jittered current
VP drives the rasterised position (matching the main pass);
viewtakes the normal + position into view space (where SSR / SSAO / SSGI / RT work); the un-jittered cur/prev VPs derive a jitter-free motion vector. MatchesGbViewinshaders/gbuffer_prepass.slang. 256 bytes (four float4x4, all naturally 16-aligned, no padding). - View
Uniforms - Per-frame view-projection uniforms, uploaded once per frame and shared across
every draw in it.
viewis the standalone view matrix the vertex shader uses to compute view-space depth for cascade selection in the fragment shader.