Expand description
G-Buffer management for deferred rendering.
The G-Buffer stores per-pixel geometric and material data that the lighting pass reads to compute final shading. This module provides configurable attachment layouts, bind/unbind semantics, debug visualization, MRT (Multiple Render Target) configuration, and memory usage statistics.
Structs§
- GBuffer
- The main G-Buffer object that manages all attachment textures and the framebuffer. This struct owns the GPU resource handles (as opaque u64 IDs) and provides bind/unbind/resize/clear operations.
- GBuffer
Attachment - Describes a single attachment in the G-Buffer.
- GBuffer
Builder - Fluent builder for constructing a G-Buffer with a custom layout.
- GBuffer
Debug View - Debug view configuration and state for visualizing G-Buffer contents.
- GBuffer
Layout - Describes the full set of attachments in a G-Buffer.
- GBuffer
Stats - Statistics about G-Buffer memory usage and performance.
- MrtConfig
- Configuration for Multiple Render Targets output from the geometry pass.
- Texture
State - Represents the runtime state of an individual texture in the G-Buffer.
Enums§
- Clear
Value - Clear value for a G-Buffer attachment.
- GBuffer
Attachment Format - Pixel format for a single G-Buffer attachment.
- GBuffer
Debug Channel - Which channel of the G-Buffer to visualize.
- GBuffer
Error - Errors that can occur during G-Buffer operations.
- GBuffer
Semantic - Named semantic for a G-Buffer attachment.
Functions§
- octahedral_
decode - Decode an octahedral-encoded normal back to a unit vector.
- octahedral_
encode - Octahedral normal encoding: packs a unit normal into 2 floats in [-1, 1]. This is more bandwidth-efficient than storing XYZ in RGBA16F.
- pack_
normal_ snorm16 - Pack a normal into a u32 using 16-bit snorm for each component.
- unpack_
normal_ snorm16 - Unpack a u32 snorm16 packed normal.