pub enum ShaderOp {
SetColor {
r: u8,
g: u8,
b: u8,
a: u8,
},
TintByUniform {
uniform_name: String,
},
SampleTexture {
sampler: u8,
},
VerticalGradient {
top: u32,
bottom: u32,
},
Passthrough,
}Expand description
High-level shader description that gets compiled to TGSI instructions.
Variants§
SetColor
Set output colour to a constant.
TintByUniform
Multiply output by a uniform colour.
Fields
§
uniform_name: StringSampleTexture
Sample a texture at the fragment coordinate.
Fields
§
sampler: u8VerticalGradient
Apply a simple gradient (top-to-bottom).
Passthrough
Passthrough (identity — copy input to output).
Trait Implementations§
impl Eq for ShaderOp
impl StructuralPartialEq for ShaderOp
Auto Trait Implementations§
impl Freeze for ShaderOp
impl RefUnwindSafe for ShaderOp
impl Send for ShaderOp
impl Sync for ShaderOp
impl Unpin for ShaderOp
impl UnwindSafe for ShaderOp
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)