pub enum TargetEncoding {
Linear,
Srgb,
}Expand description
Whether the composite shader writes a linear target (hardware encodes, or a float target)
or must manually re-encode linear→sRGB for a gamma Unorm target. The shared encode
vocabulary: the wgpu backend derives it from a wgpu::TextureFormat allowlist, the glow
backend from the live context’s sRGB-framebuffer state — but both speak this type so the
composite shader’s “encode?” branch reads the same on either path.
Variants§
Linear
The target is linear (a *Srgb format that encodes in hardware, or a float target): the
composite writes linear light directly.
Srgb
The target is a gamma Unorm format (the egui case): the composite must manually apply
the sRGB OETF before writing.
Trait Implementations§
Source§impl Clone for TargetEncoding
impl Clone for TargetEncoding
Source§fn clone(&self) -> TargetEncoding
fn clone(&self) -> TargetEncoding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TargetEncoding
Source§impl Debug for TargetEncoding
impl Debug for TargetEncoding
impl Eq for TargetEncoding
Source§impl PartialEq for TargetEncoding
impl PartialEq for TargetEncoding
Source§fn eq(&self, other: &TargetEncoding) -> bool
fn eq(&self, other: &TargetEncoding) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TargetEncoding
Auto Trait Implementations§
impl Freeze for TargetEncoding
impl RefUnwindSafe for TargetEncoding
impl Send for TargetEncoding
impl Sync for TargetEncoding
impl Unpin for TargetEncoding
impl UnsafeUnpin for TargetEncoding
impl UnwindSafe for TargetEncoding
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