pub struct GpuImageQuad {
pub corners: [[f32; 3]; 4],
pub image: usize,
pub tint: [f32; 4],
pub depth_test: bool,
pub alpha_cutoff: f32,
}Expand description
A world-space 2D image-sprite quad for GpuRenderer::draw_images_deferred.
corners are the four world points TL, TR, BL, BR (UVs (0,0) (1,0) (0,1) (1,1)); image indexes a texture uploaded via
GpuRenderer::upload_image; tint is straight RGBA in 0..=1
(multiplied into every texel); depth_test occludes the quad behind
nearer marched geometry. The facade resolves orientation + back-face
culling, so this is pure geometry.
Fields§
§corners: [[f32; 3]; 4]§image: usize§tint: [f32; 4]§depth_test: bool§alpha_cutoff: f32Texels with alpha below this (0..=1) are discarded in the FS.
0.0 keeps the plain over-blend.
Trait Implementations§
Source§impl Clone for GpuImageQuad
impl Clone for GpuImageQuad
Source§fn clone(&self) -> GpuImageQuad
fn clone(&self) -> GpuImageQuad
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GpuImageQuad
Auto Trait Implementations§
impl Freeze for GpuImageQuad
impl RefUnwindSafe for GpuImageQuad
impl Send for GpuImageQuad
impl Sync for GpuImageQuad
impl Unpin for GpuImageQuad
impl UnsafeUnpin for GpuImageQuad
impl UnwindSafe for GpuImageQuad
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