pub enum BaseColorChannels {
Rgba,
Luminance,
LuminanceAlpha,
}Expand description
How a sampled base-color texel expands into the fragment’s color.
Variants§
Rgba
The texel is a color in all four channels.
Luminance
The texel is luminance: one channel, expanded into every color channel.
The sampled value is decoded from sRGB on the way, because a
one-channel image cannot be uploaded in an sRGB format: WebGPU offers
the transfer function only for the four-channel Rgba8UnormSrgb and
Bgra8UnormSrgb, so a luminance texture carries the encoded value and
the shader decodes it.
LuminanceAlpha
The texel is luminance and alpha: two channels holding l and a,
sampled into the color and the alpha channel.
The luminance half decodes from sRGB exactly as Self::Luminance
does; alpha is coverage, so it never converts.
Trait Implementations§
Source§impl Clone for BaseColorChannels
impl Clone for BaseColorChannels
impl Copy for BaseColorChannels
Source§impl Debug for BaseColorChannels
impl Debug for BaseColorChannels
Source§impl Default for BaseColorChannels
impl Default for BaseColorChannels
impl Eq for BaseColorChannels
Source§impl Hash for BaseColorChannels
impl Hash for BaseColorChannels
Source§impl PartialEq for BaseColorChannels
impl PartialEq for BaseColorChannels
impl StructuralPartialEq for BaseColorChannels
Auto Trait Implementations§
impl Forget for BaseColorChannels
impl Freeze for BaseColorChannels
impl RefUnwindSafe for BaseColorChannels
impl Send for BaseColorChannels
impl Sync for BaseColorChannels
impl Unpin for BaseColorChannels
impl UnsafeUnpin for BaseColorChannels
impl UnwindSafe for BaseColorChannels
Blanket Implementations§
impl<T> AsId for T
impl<T> AsIdSalt for T
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
Converts
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> ⓘ
Converts
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