pub struct SsaoSettings {
pub radius: f32,
pub intensity: f32,
}Expand description
Clamped SSAO tunables resolved from the authored asset fields. Held by the
backend and turned into a per-frame SsaoParams once the camera is known.
Fields§
§radius: f32World-space hemisphere radius the horizon search covers.
intensity: f32Occlusion strength multiplier applied to the integrated visibility.
Implementations§
Source§impl SsaoSettings
impl SsaoSettings
Sourcepub fn resolve(radius: f32, intensity: f32) -> SsaoSettings
pub fn resolve(radius: f32, intensity: f32) -> SsaoSettings
Clamp the authored radius / intensity into a safe range.
Sourcepub fn params(&self, fov_y_radians: f32, aspect: f32) -> SsaoParams
pub fn params(&self, fov_y_radians: f32, aspect: f32) -> SsaoParams
Build the per-frame GPU uniform from these settings and the active
camera. fov_y_radians is the vertical field of view and aspect the
viewport width / height ratio: together they give the view-ray scale
the kernel needs to rebuild view-space positions from linear depth.
Trait Implementations§
Source§impl Clone for SsaoSettings
impl Clone for SsaoSettings
Source§fn clone(&self) -> SsaoSettings
fn clone(&self) -> SsaoSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SsaoSettings
Source§impl Debug for SsaoSettings
impl Debug for SsaoSettings
Source§impl PartialEq for SsaoSettings
impl PartialEq for SsaoSettings
impl StructuralPartialEq for SsaoSettings
Auto Trait Implementations§
impl Freeze for SsaoSettings
impl RefUnwindSafe for SsaoSettings
impl Send for SsaoSettings
impl Sync for SsaoSettings
impl Unpin for SsaoSettings
impl UnsafeUnpin for SsaoSettings
impl UnwindSafe for SsaoSettings
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
Mutably borrows from an owned value. Read more