diff --git a/crates/bevy_pbr/src/lib.rs b/crates/bevy_pbr/src/lib.rs index fc7a5b2c061ce..4d217367b7a00 100644 --- a/crates/bevy_pbr/src/lib.rs +++ b/crates/bevy_pbr/src/lib.rs @@ -46,7 +46,7 @@ impl Plugin for PbrPlugin { Handle::::default(), StandardMaterial { albedo: Color::PINK, - shaded: false, + unlit: true, albedo_texture: None, }, ); diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs index 7973c0a6f659e..1244d23a11364 100644 --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -11,7 +11,7 @@ pub struct StandardMaterial { pub albedo_texture: Option>, #[render_resources(ignore)] #[shader_def] - pub shaded: bool, + pub unlit: bool, } impl Default for StandardMaterial { @@ -19,7 +19,7 @@ impl Default for StandardMaterial { StandardMaterial { albedo: Color::rgb(1.0, 1.0, 1.0), albedo_texture: None, - shaded: true, + unlit: false, } } } diff --git a/crates/bevy_pbr/src/render_graph/forward_pipeline/forward.frag b/crates/bevy_pbr/src/render_graph/forward_pipeline/forward.frag index c523b052fd44a..fc043c0db59c9 100644 --- a/crates/bevy_pbr/src/render_graph/forward_pipeline/forward.frag +++ b/crates/bevy_pbr/src/render_graph/forward_pipeline/forward.frag @@ -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;