#[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 moreimpl Copy for SsgiParams
Source§impl Debug for SsgiParams
impl Debug for SsgiParams
impl NoUninit for SsgiParams
Auto Trait Implementations§
impl Freeze for SsgiParams
impl RefUnwindSafe for SsgiParams
impl Send for SsgiParams
impl Sync for SsgiParams
impl Unpin for SsgiParams
impl UnsafeUnpin for SsgiParams
impl UnwindSafe for SsgiParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more