Skip to main content

Module probe

Module probe 

Source
Expand description

The reflection-probe set the forward, SSR and ray-traced resolves all read. Matches ProbeUniforms / ProbeSet in shaders/probe_types.slang, whose MAX_PROBES is baked in from the constant below.

Structs§

ProbeSet
The full set of reflection probes. count is how many of probes are live; the fragment shader blends every probe whose influence box covers the surface (a partition-of-unity weight by signed box distance), falling back to the nearest when the surface is outside all boxes, and samples those slices of the probe cube array. Slices beyond count hold the sky fallback cube and a DISABLED box.
ProbeUniforms
One reflection probe’s parallax box. The specular IBL term box-projects the reflection vector against [box_min, box_max] (the probe’s influence volume) and re-anchors the cube sample at the box hit relative to probe_pos (the capture point), so a static captured cube tracks a moving first-person camera. Three float4s keep every field 16-byte aligned. box_min.w is the enabled flag: 0 disables parallax (and signals no baked probe), so the shader samples the raw reflection vector.

Constants§

MAX_PROBES
Maximum reflection probes a frame can bind. The shader’s MAX_PROBES define is injected from this value, so the two cannot drift.