Struct EnvironmentLightingGpu
#[repr(C, align(16))]pub struct EnvironmentLightingGpu {
pub metadata: [u32; 4],
pub direct_fallback: [f32; 4],
pub probes: [EnvironmentProbeGpu; 4],
}Expand description
Portable bounded environment-probe evaluation and fallback policy. Bounded, texture-independent environment lighting binding for a material.
A zero metadata[1] means that no usable probe texture/data is resident. The shader then returns the
supplied fallback environment contribution while the existing direct-lighting path continues.
The fixed-size representation is portable across native WebGPU and WebAssembly and allocates
only when the caller creates its GPU buffer.
Fields§
§metadata: [u32; 4]x = probe count; y = usable probe count; z/w reserved.
direct_fallback: [f32; 4]Fallback environment contribution, not a CPU evaluation result.
probes: [EnvironmentProbeGpu; 4]Implementations§
§impl EnvironmentLightingGpu
impl EnvironmentLightingGpu
pub fn from_probe_set(
probes: Option<&EnvironmentProbeSet>,
fallback_radiance: [f32; 3],
) -> EnvironmentLightingGpu
pub fn from_probe_set( probes: Option<&EnvironmentProbeSet>, fallback_radiance: [f32; 3], ) -> EnvironmentLightingGpu
Build a bindable contract from optional probe source data.
pub fn fallback(fallback_radiance: [f32; 3]) -> EnvironmentLightingGpu
pub fn fallback(fallback_radiance: [f32; 3]) -> EnvironmentLightingGpu
A valid no-probe contract for callers that have no resident environment resources.
pub const fn has_usable_probes(&self) -> bool
pub const fn has_usable_probes(&self) -> bool
true when usable-probes present.
Trait Implementations§
§impl Clone for EnvironmentLightingGpu
impl Clone for EnvironmentLightingGpu
§fn clone(&self) -> EnvironmentLightingGpu
fn clone(&self) -> EnvironmentLightingGpu
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 EnvironmentLightingGpu
§impl Debug for EnvironmentLightingGpu
impl Debug for EnvironmentLightingGpu
impl Pod for EnvironmentLightingGpu
Auto Trait Implementations§
impl Freeze for EnvironmentLightingGpu
impl RefUnwindSafe for EnvironmentLightingGpu
impl Send for EnvironmentLightingGpu
impl Sync for EnvironmentLightingGpu
impl Unpin for EnvironmentLightingGpu
impl UnsafeUnpin for EnvironmentLightingGpu
impl UnwindSafe for EnvironmentLightingGpu
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§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.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
impl<T> Interleave for Twhere
T: Pod,
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