pub struct PatternLod {
pub bias: f32,
pub max_level: f32,
}Expand description
How pattern textures pick their mip level, set with
WgpuRenderDevice::set_pattern_lod.
It applies to everything Noesis paints from a pattern, that is through an
ImageBrush: images, opacity masks, pattern-filled text, and a brush
shader’s sample_image. wgpu samplers have no LOD bias, so the shaders
apply it by scaling the texture coordinate derivatives; it costs no wgpu
feature.
Fields§
§bias: f32Added to the mip level the hardware would pick. Negative values pick sharper, larger levels when an image is drawn smaller than its size.
max_level: f32The highest (smallest) mip level sampled after the bias.
Trait Implementations§
Source§impl Clone for PatternLod
impl Clone for PatternLod
impl Copy for PatternLod
Source§impl Debug for PatternLod
impl Debug for PatternLod
Source§impl Default for PatternLod
impl Default for PatternLod
Source§impl PartialEq for PatternLod
impl PartialEq for PatternLod
impl StructuralPartialEq for PatternLod
Auto Trait Implementations§
impl Freeze for PatternLod
impl RefUnwindSafe for PatternLod
impl Send for PatternLod
impl Sync for PatternLod
impl Unpin for PatternLod
impl UnsafeUnpin for PatternLod
impl UnwindSafe for PatternLod
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