#[repr(C)]pub struct LineVertex {
pub pos: [f32; 3],
pub edge: f32,
pub color: [f32; 4],
}Expand description
Compact vertex type used exclusively by the line pass. 32 bytes: the expanded ribbon corner in world space, its signed position across the ribbon width (for the shader’s edge fade), and the corner colour.
Fields§
§pos: [f32; 3]World-space position of this ribbon corner. Already offset off the line centre by the CPU expansion, so the shader only applies the camera VP.
edge: f32Signed offset across the ribbon: -1 on one edge, +1 on the other. The fragment fades the outer pixel from it, so lines antialias without MSAA.
color: [f32; 4]Linear-space RGBA. Alpha carries the distance fade, interpolated along the ribbon.
Trait Implementations§
Source§impl Clone for LineVertex
impl Clone for LineVertex
Source§fn clone(&self) -> LineVertex
fn clone(&self) -> LineVertex
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 LineVertex
Source§impl Debug for LineVertex
impl Debug for LineVertex
impl NoUninit for LineVertex
Source§impl PartialEq for LineVertex
impl PartialEq for LineVertex
impl StructuralPartialEq for LineVertex
Auto Trait Implementations§
impl Freeze for LineVertex
impl RefUnwindSafe for LineVertex
impl Send for LineVertex
impl Sync for LineVertex
impl Unpin for LineVertex
impl UnsafeUnpin for LineVertex
impl UnwindSafe for LineVertex
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