mirror of
https://github.com/bevyengine/bevy
synced 2024-12-28 05:53:07 +00:00
26 lines
565 B
Rust
26 lines
565 B
Rust
use crate::{
|
|
math,
|
|
math::Vec4,
|
|
render::render_graph::{
|
|
uniform::{AsUniforms, GetBytes, UniformInfo},
|
|
BindType, ShaderDefSuffixProvider, UniformPropertyType,
|
|
},
|
|
};
|
|
|
|
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,
|
|
}
|
|
}
|
|
}
|