Skip to content

Commit

Permalink
Rename StandardMaterial::shaded to unlit
Browse files Browse the repository at this point in the history
  • Loading branch information
willcrichton committed Feb 1, 2021
1 parent 6d7ae6d commit 3241fb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/bevy_pbr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl Plugin for PbrPlugin {
Handle::<StandardMaterial>::default(),
StandardMaterial {
albedo: Color::PINK,
shaded: false,
unlit: true,
albedo_texture: None,
},
);
Expand Down
4 changes: 2 additions & 2 deletions crates/bevy_pbr/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ pub struct StandardMaterial {
pub albedo_texture: Option<Handle<Texture>>,
#[render_resources(ignore)]
#[shader_def]
pub shaded: bool,
pub unlit: bool,
}

impl Default for StandardMaterial {
fn default() -> Self {
StandardMaterial {
albedo: Color::rgb(1.0, 1.0, 1.0),
albedo_texture: None,
shaded: true,
unlit: false,
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void main() {
v_Uv);
# endif

# ifdef STANDARDMATERIAL_SHADED
# ifndef STANDARDMATERIAL_UNLIT
vec3 normal = normalize(v_Normal);
// accumulate color
vec3 color = AmbientColor;
Expand Down

0 comments on commit 3241fb8

Please sign in to comment.