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

27 lines
565 B
Rust
Raw Normal View History

2020-02-10 02:09:54 +00:00
use crate::{
2020-02-11 17:31:49 +00:00
math,
2020-02-10 02:09:54 +00:00
math::Vec4,
2020-02-18 02:36:31 +00:00
render::render_graph::{
2020-02-10 02:09:54 +00:00
uniform::{AsUniforms, GetBytes, UniformInfo},
BindType, ShaderDefSuffixProvider, UniformPropertyType,
2020-02-10 02:09:54 +00:00
},
};
use bevy_derive::Uniforms;
#[derive(Uniforms)]
pub struct StandardMaterial {
pub albedo: Vec4,
#[uniform(ignore, shader_def)]
2020-02-11 03:26:04 +00:00
pub everything_is_red: bool,
2020-02-11 17:31:49 +00:00
}
impl Default for StandardMaterial {
fn default() -> Self {
StandardMaterial {
albedo: math::vec4(0.3, 0.3, 0.3, 1.0),
everything_is_red: false,
}
}
}