bevy/src/render/render_graph/uniforms/standard_material.rs
2020-02-17 19:53:48 -08:00

20 lines
488 B
Rust

use crate::{math, math::Vec4, render::render_graph::ShaderDefSuffixProvider};
use crate as bevy; // for macro imports
use bevy_derive::Uniforms;
#[derive(Uniforms)]
pub struct StandardMaterial {
pub albedo: Vec4,
#[uniform(ignore, shader_def)]
pub everything_is_red: bool,
}
impl Default for StandardMaterial {
fn default() -> Self {
StandardMaterial {
albedo: math::vec4(0.3, 0.3, 0.3, 1.0),
everything_is_red: false,
}
}
}