pub struct TextureMaterial3d { /* private fields */ }Expand description
Cheap immutable unlit material sharing one opaque texture and filter state.
Sampled linear RGB is multiplied by this normalized opaque tint and the
object’s SurfaceStyle3d color. Depth writes/tests and no-culling winding
semantics are identical to ordinary opaque surfaces. Transparency, lighting
and alpha-cutout are intentionally separate capabilities.
Implementations§
Source§impl TextureMaterial3d
impl TextureMaterial3d
Sourcepub fn new(
texture: &Texture3d,
sampling: ImageSampling,
tint: Color,
) -> Result<Self, Texture3dError>
pub fn new( texture: &Texture3d, sampling: ImageSampling, tint: Color, ) -> Result<Self, Texture3dError>
Creates an immutable material; tint is normalized and fully opaque.
Sourcepub const fn sampling(&self) -> ImageSampling
pub const fn sampling(&self) -> ImageSampling
Returns nearest or linear mip-zero sampling.
Trait Implementations§
Source§impl Clone for TextureMaterial3d
impl Clone for TextureMaterial3d
Source§fn clone(&self) -> TextureMaterial3d
fn clone(&self) -> TextureMaterial3d
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for TextureMaterial3d
impl !UnwindSafe for TextureMaterial3d
impl Freeze for TextureMaterial3d
impl Send for TextureMaterial3d
impl Sync for TextureMaterial3d
impl Unpin for TextureMaterial3d
impl UnsafeUnpin for TextureMaterial3d
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