#[repr(C)]pub struct ProbeUniforms {
pub box_min: [f32; 4],
pub box_max: [f32; 4],
pub probe_pos: [f32; 4],
}Expand description
One reflection probe’s parallax box. The specular IBL term box-projects the
reflection vector against [box_min, box_max] (the probe’s influence volume)
and re-anchors the cube sample at the box hit relative to probe_pos (the
capture point), so a static captured cube tracks a moving first-person
camera. Three float4s keep every field 16-byte aligned. box_min.w is the
enabled flag: 0 disables parallax (and signals no baked probe), so the shader
samples the raw reflection vector.
Fields§
§box_min: [f32; 4]xyz = influence-box min; w = enabled (1.0 = parallax on, 0.0 = off).
box_max: [f32; 4]xyz = influence-box max; w unused.
probe_pos: [f32; 4]xyz = probe capture position; w unused.
Implementations§
Source§impl ProbeUniforms
impl ProbeUniforms
Sourcepub const DISABLED: ProbeUniforms
pub const DISABLED: ProbeUniforms
The “no probe” value: parallax disabled, so the shader samples the raw reflection vector (which, with the probe cube slot aliasing the sky until a bake, reproduces the pre-probe reflection exactly).
Trait Implementations§
Source§impl Clone for ProbeUniforms
impl Clone for ProbeUniforms
Source§fn clone(&self) -> ProbeUniforms
fn clone(&self) -> ProbeUniforms
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 ProbeUniforms
impl Pod for ProbeUniforms
Auto Trait Implementations§
impl Freeze for ProbeUniforms
impl RefUnwindSafe for ProbeUniforms
impl Send for ProbeUniforms
impl Sync for ProbeUniforms
impl Unpin for ProbeUniforms
impl UnsafeUnpin for ProbeUniforms
impl UnwindSafe for ProbeUniforms
Blanket Implementations§
impl<T> AnyBitPattern for Twhere
T: Pod,
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.