pub struct ShaderDraw {
pub rect: Rect,
pub uv: [f32; 4],
pub shader: ShaderId,
pub uniforms: Arc<[u8]>,
pub textures: Arc<[(u32, TexInput)]>,
pub blend: BlendMode,
pub opacity: f32,
}Expand description
A custom-shader rectangle.
Fields§
§rect: RectDestination rectangle in logical coordinates.
uv: [f32; 4]Texture coordinates as [u0, v0, u1, v1].
shader: ShaderIdRegistered shader to execute.
uniforms: Arc<[u8]>Raw uniform bytes exposed to the shader as uniforms.values.
The renderer truncates payloads to MAX_SHADER_UNIFORM_BYTES and
zero-fills the remainder.
textures: Arc<[(u32, TexInput)]>Binding index and texture source pairs.
blend: BlendModeCompositing mode applied to the shader output.
opacity: f32Additional opacity in the range 0..=1.
Trait Implementations§
Source§impl Clone for ShaderDraw
impl Clone for ShaderDraw
Source§impl Debug for ShaderDraw
impl Debug for ShaderDraw
Source§impl PartialEq for ShaderDraw
impl PartialEq for ShaderDraw
impl StructuralPartialEq for ShaderDraw
Auto Trait Implementations§
impl Freeze for ShaderDraw
impl RefUnwindSafe for ShaderDraw
impl Send for ShaderDraw
impl Sync for ShaderDraw
impl Unpin for ShaderDraw
impl UnsafeUnpin for ShaderDraw
impl UnwindSafe for ShaderDraw
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