diff --git a/crates/bevy_pbr/src/pbr_material.rs b/crates/bevy_pbr/src/pbr_material.rs index 4989c2536b..224bd3ed5c 100644 --- a/crates/bevy_pbr/src/pbr_material.rs +++ b/crates/bevy_pbr/src/pbr_material.rs @@ -437,8 +437,8 @@ pub struct StandardMaterial { /// the [`StandardMaterial::specular_tint_texture`] has no alpha value, it /// may be desirable to pack the values together and supply the same /// texture to both fields. - #[texture(27)] - #[sampler(28)] + #[cfg_attr(feature = "pbr_specular_textures", texture(27))] + #[cfg_attr(feature = "pbr_specular_textures", sampler(28))] #[cfg(feature = "pbr_specular_textures")] pub specular_texture: Option>, @@ -458,9 +458,9 @@ pub struct StandardMaterial { /// /// Like the fixed specular tint value, this texture map isn't supported in /// the deferred renderer. + #[cfg_attr(feature = "pbr_specular_textures", texture(29))] + #[cfg_attr(feature = "pbr_specular_textures", sampler(30))] #[cfg(feature = "pbr_specular_textures")] - #[texture(29)] - #[sampler(30)] pub specular_tint_texture: Option>, /// An extra thin translucent layer on top of the main PBR layer. This is