#[repr(C)]pub struct SsgiParams {
pub intensity: f32,
pub max_distance: f32,
pub tan_half_fov_y: f32,
pub aspect: f32,
pub stride: f32,
pub thickness: f32,
pub rays: f32,
pub steps: f32,
}Expand description
Per-frame uniform for the screen-space global-illumination (SSGI) gather +
composite. Carries the clamped authored tunables and the view-ray scale the
gather pass uses to project a view-space ray point back to a screen UV.
Pushed verbatim to the SSGI gather + composite fragment shaders, so the
layout must stay in sync with the SsgiParams struct there. 32 bytes.
Fields§
§intensity: f32Indirect-bounce blend strength; scales the gathered radiance the composite pass adds on top of the existing shading.
max_distance: f32Maximum world-space distance a hemisphere ray marches before giving up.
tan_half_fov_y: f32tan(fov_y / 2): the vertical view-ray half-extent at unit depth.
aspect: f32Viewport aspect ratio (width / height).
stride: f32World-space length of one ray-march step.
thickness: f32View-space depth tolerance for accepting a ray/scene-depth intersection.
rays: f32Hemisphere rays cast per pixel (carried as f32; the shader reads it as an int loop bound). Backends that still bake a compile-time ray count ignore this field, so the 32-byte layout is unchanged.
steps: f32Ray-march samples per ray (same f32-as-int-bound convention as rays).
Trait Implementations§
Source§impl Clone for SsgiParams
impl Clone for SsgiParams
Source§fn clone(&self) -> SsgiParams
fn clone(&self) -> SsgiParams
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more