pub enum AlbedoComponent {
None,
Vertex {
srgb: bool,
},
Value(Vec4),
ValueVertex {
value: Vec4,
srgb: bool,
},
Texture(TextureHandle),
TextureVertex {
texture: TextureHandle,
srgb: bool,
},
TextureValue {
texture: TextureHandle,
value: Vec4,
},
TextureVertexValue {
texture: TextureHandle,
srgb: bool,
value: Vec4,
},
}
Expand description
How the albedo color should be determined.
Variants§
None
No albedo color.
Vertex
Albedo color is the vertex value.
Value(Vec4)
Albedo color is the given value.
ValueVertex
Albedo color is the given value multiplied by the vertex color.
Texture(TextureHandle)
Albedo color is loaded from the given texture.
TextureVertex
Albedo color is loaded from the given texture, then multiplied by the vertex color.
Fields
§
texture: TextureHandle
TextureValue
Albedo color is loaded from given texture, then multiplied by the given value.
TextureVertexValue
Albedo color is loaded from the given texture, then multiplied by the vertex color and the given value.
Implementations§
Source§impl AlbedoComponent
impl AlbedoComponent
pub fn to_value(&self) -> Vec4
pub fn to_flags(&self) -> MaterialFlags
pub fn is_texture(&self) -> bool
pub fn to_texture(&self) -> Option<&TextureHandle>
Trait Implementations§
Source§impl Clone for AlbedoComponent
impl Clone for AlbedoComponent
Source§fn clone(&self) -> AlbedoComponent
fn clone(&self) -> AlbedoComponent
Returns a duplicate 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 AlbedoComponent
impl Debug for AlbedoComponent
Auto Trait Implementations§
impl Freeze for AlbedoComponent
impl RefUnwindSafe for AlbedoComponent
impl Send for AlbedoComponent
impl Sync for AlbedoComponent
impl Unpin for AlbedoComponent
impl UnwindSafe for AlbedoComponent
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