[−][src]Struct duku::Material
Material parameters to use in a shader.
Examples
let mut material = duku.create_material_pbr()?; material.roughness(0.5); target.set_material(&material); target.draw_cube();
Fields
a: Vector4
parameter A
b: Vector4
parameter B
c: Vector4
parameter C
d: Vector4
parameter D
e: Vector4
parameter E
f: Vector4
parameter F
g: Vector4
parameter G
h: Vector4
parameter H
textures: Vec<Handle<Texture>>
texture storage for that are used in the material
Implementations
impl Material
[src]
pub fn albedo_color(&mut self, color: impl Into<Color>)
[src]
Set albedo color for the PBR (and other various) shaders
pub fn albedo_texture(&mut self, texture: Handle<Texture>)
[src]
Set albedo texture for the PBR (and other various) shaders
pub fn albedo_framebuffer(&mut self, f: &Handle<Framebuffer>)
[src]
Set albedo texture as a framebuffer for the PBR (and other various) shaders
pub fn metalness(&mut self, value: f32)
[src]
Set metalness factor for the PBR shader
pub fn roughness(&mut self, value: f32)
[src]
Set roughness factor for the PBR shader
pub fn emissive(&mut self, color: impl Into<Color>)
[src]
Set emissive color for the PBR shader
pub fn metalness_roughness_texture(&mut self, texture: Handle<Texture>)
[src]
Set metalness-roughness texture for the PBR shader
pub fn ambient_occlusion_texture(&mut self, texture: Handle<Texture>)
[src]
Set ambient occlusion texture for the PBR shader
pub fn normal_texture(&mut self, texture: Handle<Texture>)
[src]
Set normal texture for the PBR shader
pub fn emissive_texture(&mut self, texture: Handle<Texture>)
[src]
Set emissive texture for the PBR shader
pub fn fix_albedo_color_space(&mut self)
[src]
Fix material's color space when it is
incorrectly exported for example with some gltf
models
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Material
impl !Send for Material
impl !Sync for Material
impl Unpin for Material
impl UnwindSafe for Material
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,