Struct three_d::renderer::material::NormalMaterial [−][src]
pub struct NormalMaterial {
pub normal_scale: f32,
pub normal_texture: Option<Rc<Texture2D<u8>>>,
pub render_states: RenderStates,
}
Fields
normal_scale: f32
A scalar multiplier applied to each normal vector of the Self::normal_texture.
normal_texture: Option<Rc<Texture2D<u8>>>
A tangent space normal map, also known as bump map.
render_states: RenderStates
Implementations
Trait Implementations
Returns the fragment shader source for this material. Should output the final fragment color.
fn use_uniforms(
&self,
program: &Program,
_camera: &Camera,
_lights: &Lights
) -> ThreeDResult<()>
fn use_uniforms(
&self,
program: &Program,
_camera: &Camera,
_lights: &Lights
) -> ThreeDResult<()>
Sends the uniform data needed for this material to the fragment shader.
Returns the render states needed to render with this material.
Returns whether or not this material is transparent.
Auto Trait Implementations
impl !RefUnwindSafe for NormalMaterial
impl !Send for NormalMaterial
impl !Sync for NormalMaterial
impl Unpin for NormalMaterial
impl !UnwindSafe for NormalMaterial
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more