pub struct VolumetricFogPassDesc {Show 16 fields
pub width: u32,
pub height: u32,
pub depth_slices: u32,
pub output_format: TextureFormat,
pub output_fog: ResourceId,
pub input_depth: ResourceId,
pub input_shadow_map: ResourceId,
pub scattering: f32,
pub absorption: f32,
pub density: f32,
pub phase_g: f32,
pub ambient_intensity: f32,
pub max_distance: f32,
pub use_temporal_reprojection: bool,
pub noise_scale: Vec3,
pub wind_speed: Vec3,
}Fields§
§width: u32§height: u32§depth_slices: u32§output_format: TextureFormat§output_fog: ResourceId§input_depth: ResourceId§input_shadow_map: ResourceId§scattering: f32§absorption: f32§density: f32§phase_g: f32§ambient_intensity: f32§max_distance: f32§use_temporal_reprojection: bool§noise_scale: Vec3§wind_speed: Vec3Implementations§
Source§impl VolumetricFogPassDesc
impl VolumetricFogPassDesc
pub fn default(width: u32, height: u32) -> Self
Sourcepub fn henyey_greenstein(&self, cos_theta: f32) -> f32
pub fn henyey_greenstein(&self, cos_theta: f32) -> f32
Henyey-Greenstein phase function
Sourcepub fn extinction(&self, distance: f32) -> f32
pub fn extinction(&self, distance: f32) -> f32
Beer-Lambert extinction
Sourcepub fn cornette_shanks(&self, cos_theta: f32) -> f32
pub fn cornette_shanks(&self, cos_theta: f32) -> f32
Cornette-Shanks phase function (more accurate than HG)
Sourcepub fn froxel_depth_from_slice(&self, slice: u32, near: f32, far: f32) -> f32
pub fn froxel_depth_from_slice(&self, slice: u32, near: f32, far: f32) -> f32
Compute froxel (frustum voxel) z-slice position using log distribution
pub fn froxel_volume_size(&self) -> (u32, u32, u32)
Trait Implementations§
Source§impl Clone for VolumetricFogPassDesc
impl Clone for VolumetricFogPassDesc
Auto Trait Implementations§
impl Freeze for VolumetricFogPassDesc
impl RefUnwindSafe for VolumetricFogPassDesc
impl Send for VolumetricFogPassDesc
impl Sync for VolumetricFogPassDesc
impl Unpin for VolumetricFogPassDesc
impl UnsafeUnpin for VolumetricFogPassDesc
impl UnwindSafe for VolumetricFogPassDesc
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
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,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.