Enum three_d::renderer::ColorMapping
source · pub enum ColorMapping {
None = 0,
ComputeToSrgb = 1,
}
Expand description
Color space mapping used for mapping to/from color spaces when rendering.
Variants§
None = 0
No color mapping. Use this if you are rendering into an intermediate render target, ie. this is not the final render pass that renders into the screen.
ComputeToSrgb = 1
Maps from compute color space (HDR or linear sRGB) to sRGB color space. Use this if this is the final render pass, ie. you write to the screen or want to save it as an image.
Implementations§
source§impl ColorMapping
impl ColorMapping
sourcepub fn fragment_shader_source() -> &'static str
pub fn fragment_shader_source() -> &'static str
Returns the fragment shader source for mapping to the specified color space in a shader.
sourcepub fn use_uniforms(&self, program: &Program)
pub fn use_uniforms(&self, program: &Program)
Sends the uniform data needed to apply this color space mapping to the fragment shader.
Trait Implementations§
source§impl Clone for ColorMapping
impl Clone for ColorMapping
source§fn clone(&self) -> ColorMapping
fn clone(&self) -> ColorMapping
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ColorMapping
impl Debug for ColorMapping
source§impl Default for ColorMapping
impl Default for ColorMapping
source§fn default() -> ColorMapping
fn default() -> ColorMapping
Returns the “default value” for a type. Read more
source§impl Ord for ColorMapping
impl Ord for ColorMapping
source§fn cmp(&self, other: &ColorMapping) -> Ordering
fn cmp(&self, other: &ColorMapping) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for ColorMapping
impl PartialEq for ColorMapping
source§fn eq(&self, other: &ColorMapping) -> bool
fn eq(&self, other: &ColorMapping) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for ColorMapping
impl PartialOrd for ColorMapping
source§fn partial_cmp(&self, other: &ColorMapping) -> Option<Ordering>
fn partial_cmp(&self, other: &ColorMapping) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ColorMapping
impl Eq for ColorMapping
impl StructuralPartialEq for ColorMapping
Auto Trait Implementations§
impl RefUnwindSafe for ColorMapping
impl Send for ColorMapping
impl Sync for ColorMapping
impl Unpin for ColorMapping
impl UnwindSafe for ColorMapping
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