bevy/src/render/shader/uniforms/standard_material.rs

24 lines
484 B
Rust
Raw Normal View History

2020-03-20 19:47:33 +00:00
use crate::{
asset::Handle,
render::{texture::Texture, Color},
};
2020-02-10 02:09:54 +00:00
2020-02-18 03:53:48 +00:00
use crate as bevy; // for macro imports
2020-02-10 02:09:54 +00:00
use bevy_derive::Uniforms;
#[derive(Uniforms)]
pub struct StandardMaterial {
pub albedo: Color,
#[uniform(shader_def)]
pub albedo_texture: Option<Handle<Texture>>,
2020-02-11 17:31:49 +00:00
}
impl Default for StandardMaterial {
fn default() -> Self {
StandardMaterial {
albedo: Color::rgb(1.0, 1.0, 1.0),
albedo_texture: None,
2020-02-11 17:31:49 +00:00
}
}
}