pub struct ReflectionProbe3D { /* private fields */ }Expand description
Box-parallax-corrected local specular cubemap reflection probe with roughness mip chain and smooth falloff.
Implementations§
Source§impl ReflectionProbe3D
Baking, box-parallax correction, smooth blend-distance falloff, and trilinear roughness-mip sampling for ReflectionProbe3D.
impl ReflectionProbe3D
Baking, box-parallax correction, smooth blend-distance falloff, and trilinear roughness-mip sampling for ReflectionProbe3D.
Sourcepub fn bake_from_sampler<F>(
position: Vec3,
bounds: AxisAlignedBox3D,
blend_distance: f32,
face_size: u32,
mip_count: usize,
sampler: F,
) -> Self
pub fn bake_from_sampler<F>( position: Vec3, bounds: AxisAlignedBox3D, blend_distance: f32, face_size: u32, mip_count: usize, sampler: F, ) -> Self
Bakes a 6-face GGX-prefiltered ReflectionProbe3D from any directional environment radiance closure.
§Arguments
Vec3- Probe world-space capture center.AxisAlignedBox3D- Local box volume for influence and parallax correction.f32- Smooth blend fade margin in meters (>= 0.01).u32- Basemip 0cubemap face resolution (clamped>= 4).usize- Number of roughness mip levels (clamped1..=6).F- Directional radiance callback mapping unit direction to linear HDR RGB.
§Returns
Self- Prefiltered local reflection probe.
Sourcepub fn bake_from_sky_and_rig(
position: Vec3,
bounds: AxisAlignedBox3D,
blend_distance: f32,
resolution_mips: (u32, usize),
sky: &PhysicalSky3D,
sun_dir: Vec3,
rig: &LightRig3D,
) -> Self
pub fn bake_from_sky_and_rig( position: Vec3, bounds: AxisAlignedBox3D, blend_distance: f32, resolution_mips: (u32, usize), sky: &PhysicalSky3D, sun_dir: Vec3, rig: &LightRig3D, ) -> Self
Bakes a local ReflectionProbe3D combining PhysicalSky3D and local highlights from LightRig3D.
§Arguments
Vec3- Probe capture center.AxisAlignedBox3D- Parallax and influence box bounds.f32- Smooth blend fade margin in meters.(u32, usize)-(base_face_size, mip_count)cubemap pyramid settings.&PhysicalSky3D- Atmospheric sky dome.Vec3- Unit sun direction.&LightRig3D- Scene light rig contributing local specular highlights.
§Returns
Self- Prefiltered reflection probe.
Sourcepub fn parallax_correct_direction(
&self,
world_pos: Vec3,
reflect_dir: Vec3,
) -> Vec3
pub fn parallax_correct_direction( &self, world_pos: Vec3, reflect_dir: Vec3, ) -> Vec3
Sourcepub fn blend_weight(&self, world_pos: Vec3) -> f32
pub fn blend_weight(&self, world_pos: Vec3) -> f32
Sourcepub fn sample_specular(
&self,
world_pos: Vec3,
reflect_dir: Vec3,
roughness: f32,
) -> (Vec3, f32)
pub fn sample_specular( &self, world_pos: Vec3, reflect_dir: Vec3, roughness: f32, ) -> (Vec3, f32)
Samples parallax-corrected trilinearly filtered specular radiance and influence weight (radiance, weight).
§Arguments
Vec3- World-space shading position.Vec3- World-space reflection vector.f32- Surface perceptual roughness in[0.0, 1.0].
§Returns
(Vec3, f32)-(prefiltered_specular_rgb, blend_weight)tuple.
Source§impl ReflectionProbe3D
Implements impl #impl_generics #name #ty_generics #where_clause.
impl ReflectionProbe3D
Implements impl #impl_generics #name #ty_generics #where_clause.
pub fn get_position(&self) -> Vec3
pub fn get_mut_position(&mut self) -> &mut Vec3
pub fn set_position(&mut self, val: Vec3) -> &mut Self
pub fn get_bounds(&self) -> AxisAlignedBox3D
pub fn get_mut_bounds(&mut self) -> &mut AxisAlignedBox3D
pub fn set_bounds(&mut self, val: AxisAlignedBox3D) -> &mut Self
pub fn get_blend_distance(&self) -> f32
pub fn get_mut_blend_distance(&mut self) -> &mut f32
pub fn set_blend_distance(&mut self, val: f32) -> &mut Self
pub fn get_intensity(&self) -> f32
pub fn get_mut_intensity(&mut self) -> &mut f32
pub fn set_intensity(&mut self, val: f32) -> &mut Self
pub fn get_base_face_size(&self) -> u32
pub fn get_mut_base_face_size(&mut self) -> &mut u32
pub fn set_base_face_size(&mut self, val: u32) -> &mut Self
pub fn get_mip_levels(&self) -> &Vec<CubeMapMip3D>
pub fn get_mut_mip_levels(&mut self) -> &mut Vec<CubeMapMip3D>
pub fn set_mip_levels(&mut self, val: Vec<CubeMapMip3D>) -> &mut Self
Trait Implementations§
Source§impl Clone for ReflectionProbe3D
impl Clone for ReflectionProbe3D
Source§impl Debug for ReflectionProbe3D
impl Debug for ReflectionProbe3D
Source§impl PartialEq for ReflectionProbe3D
impl PartialEq for ReflectionProbe3D
impl StructuralPartialEq for ReflectionProbe3D
Auto Trait Implementations§
impl Forget for ReflectionProbe3D
impl Freeze for ReflectionProbe3D
impl Move for ReflectionProbe3D
impl RefUnwindSafe for ReflectionProbe3D
impl Send for ReflectionProbe3Dwhere
RawVecInner: Send,
impl Sync for ReflectionProbe3Dwhere
RawVecInner: Sync,
impl Unpin for ReflectionProbe3D
impl UnsafeUnpin for ReflectionProbe3D
impl UnwindSafe for ReflectionProbe3Dwhere
RawVecInner: UnwindSafe,
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