pub struct TexturedMaterial3D {
pub texture: TextureId,
pub tint: Color,
pub uv_transform: UvTransform,
pub lit: bool,
pub opacity: f32,
}Expand description
Textured surface material.
Fields§
§texture: TextureIdTexture sampled per fragment.
tint: ColorMultiplied with the sampled RGBA before lighting.
uv_transform: UvTransformSub-rect of the texture addressed by the mesh UVs.
lit: boolWhether the surface receives scene lighting. Tiles are usually unlit because the imagery already carries shading.
opacity: f32How much of the sampled alpha to honour, 0..=1.
Implementations§
Source§impl TexturedMaterial3D
impl TexturedMaterial3D
pub fn new(texture: TextureId) -> Self
pub fn with_uv_transform(self, transform: UvTransform) -> Self
pub fn with_tint(self, tint: Color) -> Self
Trait Implementations§
Source§impl Clone for TexturedMaterial3D
impl Clone for TexturedMaterial3D
Source§impl Debug for TexturedMaterial3D
impl Debug for TexturedMaterial3D
Source§impl PartialEq for TexturedMaterial3D
impl PartialEq for TexturedMaterial3D
impl StructuralPartialEq for TexturedMaterial3D
Auto Trait Implementations§
impl Forget for TexturedMaterial3D
impl Freeze for TexturedMaterial3D
impl Move for TexturedMaterial3D
impl RefUnwindSafe for TexturedMaterial3D
impl Send for TexturedMaterial3D
impl Sync for TexturedMaterial3D
impl Unpin for TexturedMaterial3D
impl UnsafeUnpin for TexturedMaterial3D
impl UnwindSafe for TexturedMaterial3D
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