#[repr(C)]pub struct CustomShapeInstance {
pub center_radius: [f32; 4],
pub angle_zoom_ang_sides: [f32; 4],
pub color_center: [f32; 4],
pub color_edge: [f32; 4],
pub border_color: [f32; 4],
pub border_flags: [f32; 4],
}Expand description
GPU-side per-instance record. repr(C) + Pod for direct
bytemuck::cast_slice upload to a storage buffer. Each field is a
vec4-aligned 16-byte block so the WGSL array<ShapeInstance> layout
matches without an explicit align(16) shim.
Fields§
§center_radius: [f32; 4][center_x, center_y, radius_x, radius_y] — center is
clip-space (-1..1); radius is in clip units before the shader’s
aspect correction.
angle_zoom_ang_sides: [f32; 4][angle (radians), tex_zoom, tex_ang (radians), sides (f32 → u32)].
color_center: [f32; 4]§color_edge: [f32; 4]§border_color: [f32; 4]§border_flags: [f32; 4][border_size, flag_bits, pad, pad] where flag_bits is:
- bit 0:
textured - bit 1:
additive - bit 2:
thick_outline
Trait Implementations§
Source§impl Clone for CustomShapeInstance
impl Clone for CustomShapeInstance
Source§fn clone(&self) -> CustomShapeInstance
fn clone(&self) -> CustomShapeInstance
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CustomShapeInstance
impl Debug for CustomShapeInstance
Source§impl Default for CustomShapeInstance
impl Default for CustomShapeInstance
Source§fn default() -> CustomShapeInstance
fn default() -> CustomShapeInstance
Returns the “default value” for a type. Read more
Source§impl PartialEq for CustomShapeInstance
impl PartialEq for CustomShapeInstance
impl Copy for CustomShapeInstance
impl Pod for CustomShapeInstance
impl StructuralPartialEq for CustomShapeInstance
Auto Trait Implementations§
impl Freeze for CustomShapeInstance
impl RefUnwindSafe for CustomShapeInstance
impl Send for CustomShapeInstance
impl Sync for CustomShapeInstance
impl Unpin for CustomShapeInstance
impl UnwindSafe for CustomShapeInstance
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
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().