Enum flo_render::ShaderType
source · pub enum ShaderType {
Simple {
erase_texture: Option<TextureId>,
clip_texture: Option<TextureId>,
},
DashedLine {
dash_texture: TextureId,
erase_texture: Option<TextureId>,
clip_texture: Option<TextureId>,
},
Texture {
texture: TextureId,
texture_transform: Matrix,
repeat: bool,
alpha: f32,
erase_texture: Option<TextureId>,
clip_texture: Option<TextureId>,
},
LinearGradient {
texture: TextureId,
texture_transform: Matrix,
repeat: bool,
alpha: f32,
erase_texture: Option<TextureId>,
clip_texture: Option<TextureId>,
},
}
Expand description
The shaders that can be chosen for the renderer
Variants§
Simple
Flat colour shader The erase texture (which should be a MSAA texture) is subtracted from anything drawn, if present
DashedLine
Flat colour with ‘dashed line’ texturing using a 1D texture
Texture
Fields
Colour derived from a texture with a transform mapping from canvas coordinates to texture coordinates
LinearGradient
Fields
Colour dervide from a 1D texture using a transform mapping (used for rendering linear gradients)
Implementations§
source§impl ShaderType
impl ShaderType
sourcepub fn with_erase_mask(
self,
new_erase_mask_texture: Option<TextureId>
) -> ShaderType
pub fn with_erase_mask( self, new_erase_mask_texture: Option<TextureId> ) -> ShaderType
Adds an erase mask texture to the existing shader
sourcepub fn with_clip_mask(
self,
new_clip_mask_texture: Option<TextureId>
) -> ShaderType
pub fn with_clip_mask( self, new_clip_mask_texture: Option<TextureId> ) -> ShaderType
Adds a clip mask texture to the existing shader
Trait Implementations§
source§impl Clone for ShaderType
impl Clone for ShaderType
source§fn clone(&self) -> ShaderType
fn clone(&self) -> ShaderType
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 ShaderType
impl Debug for ShaderType
source§impl PartialEq<ShaderType> for ShaderType
impl PartialEq<ShaderType> for ShaderType
source§fn eq(&self, other: &ShaderType) -> bool
fn eq(&self, other: &ShaderType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.