Enum flo_render_canvas::ShaderType[][src]

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

Fields of Simple

erase_texture: Option<TextureId>clip_texture: Option<TextureId>
DashedLine

Flat colour with ‘dashed line’ texturing using a 1D texture

Fields of DashedLine

dash_texture: TextureIderase_texture: Option<TextureId>clip_texture: Option<TextureId>
Texture

Colour derived from a texture with a transform mapping from canvas coordinates to texture coordinates

Fields of Texture

texture: TextureIdtexture_transform: Matrixrepeat: boolalpha: f32erase_texture: Option<TextureId>clip_texture: Option<TextureId>
LinearGradient

Colour dervide from a 1D texture using a transform mapping (used for rendering linear gradients)

Fields of LinearGradient

texture: TextureIdtexture_transform: Matrixrepeat: boolalpha: f32erase_texture: Option<TextureId>clip_texture: Option<TextureId>

Implementations

Adds an erase mask texture to the existing shader

Adds a clip mask texture to the existing shader

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.