pub struct GradientTextureLayout {
pub width: u32,
pub height: u32,
}Expand description
Geometry of the single texture the packed gradient LUTs are uploaded into.
The texture holds ramps as a flat texel stream that wraps at width; a ramp is
free to straddle a row boundary, so width constrains nothing but the upload
footprint.
Fields§
§width: u32Texture width in texels.
height: u32Texture height in texels.
Implementations§
Source§impl GradientTextureLayout
impl GradientTextureLayout
Sourcepub const FORMAT: TextureFormat = wgpu::TextureFormat::Rgba8Unorm
pub const FORMAT: TextureFormat = wgpu::TextureFormat::Rgba8Unorm
The texture format gradient LUTs are packed for.
Sourcepub fn bytes_per_row(self) -> u32
pub fn bytes_per_row(self) -> u32
Row stride in bytes, as required by wgpu’s texel copy layout.
Sourcepub fn byte_capacity(self) -> usize
pub fn byte_capacity(self) -> usize
Total byte footprint of the texture — the length an upload must be padded to.
Sourcepub fn worst_case_entry_capacity(self) -> u32
pub fn worst_case_entry_capacity(self) -> u32
The number of cache entries this texture can hold in the worst case, where every ramp is baked at the maximum LUT size.
Trait Implementations§
Source§impl Clone for GradientTextureLayout
impl Clone for GradientTextureLayout
impl Copy for GradientTextureLayout
Source§impl Debug for GradientTextureLayout
impl Debug for GradientTextureLayout
impl Eq for GradientTextureLayout
Source§impl PartialEq for GradientTextureLayout
impl PartialEq for GradientTextureLayout
impl StructuralPartialEq for GradientTextureLayout
Auto Trait Implementations§
impl Freeze for GradientTextureLayout
impl RefUnwindSafe for GradientTextureLayout
impl Send for GradientTextureLayout
impl Sync for GradientTextureLayout
impl Unpin for GradientTextureLayout
impl UnsafeUnpin for GradientTextureLayout
impl UnwindSafe for GradientTextureLayout
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.