Expand description
Hardware ray-traced reflection configuration. Backend-agnostic resolve of the
authored PostProcessConfig fields into clamped settings, plus the per-frame
GPU uniform. The acceleration-structure build and the inline ray-trace itself
live in the backend (Metal); this module owns only the parameter math so it
can be unit-tested without a GPU.
RT reflections replace SSR’s screen-space resolve: they reuse the same
authored ssr_intensity / ssr_max_distance tunables (so a world toggling
from SSR to RT keeps the same look knobs) but trace a real ray against the
scene BVH, so reflected geometry that is off-screen still appears.
Structs§
- RtParams
Inputs - Per-frame camera + sun inputs for building the RT-reflection GPU uniform.
fov_y_radians/aspectgive the view-ray scale used to rebuild a view-space position from the SSR pre-pass G-buffer.inv_view_rotis the view-to-world rotation (the transpose of the view matrix’s orthonormal 3x3) andcam_posthe world camera position; together they form the camera-to-world transform that lifts the reconstructed hit point + normal into the BVH’s world space.sun_diris the world-space unit direction toward the sun andsun_colorits radiance;prefilter_mip_countis the IBL cubemap mip count (0 = no IBL) for the miss fallback. - RtReflection
Settings - Clamped RT-reflection tunables resolved from the authored asset fields. Held
by the backend and turned into a per-frame
RtParamsonce the camera and sun are known.