Skip to content

Commit eb37e86

Browse files
hukasumockersf
authored andcommitted
Make bindings behind pbr_specular_textures flag consistent with other gated fields (#18645)
# Objective Make all feature gated bindings consistent with each other ## Solution Make the bindings of fields gated by `pbr_specular_textures` feature consistent with the other gated bindings
1 parent 3e7c6a6 commit eb37e86

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

crates/bevy_pbr/src/pbr_material.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ pub struct StandardMaterial {
437437
/// the [`StandardMaterial::specular_tint_texture`] has no alpha value, it
438438
/// may be desirable to pack the values together and supply the same
439439
/// texture to both fields.
440-
#[texture(27)]
441-
#[sampler(28)]
440+
#[cfg_attr(feature = "pbr_specular_textures", texture(27))]
441+
#[cfg_attr(feature = "pbr_specular_textures", sampler(28))]
442442
#[cfg(feature = "pbr_specular_textures")]
443443
pub specular_texture: Option<Handle<Image>>,
444444

@@ -458,9 +458,9 @@ pub struct StandardMaterial {
458458
///
459459
/// Like the fixed specular tint value, this texture map isn't supported in
460460
/// the deferred renderer.
461+
#[cfg_attr(feature = "pbr_specular_textures", texture(29))]
462+
#[cfg_attr(feature = "pbr_specular_textures", sampler(30))]
461463
#[cfg(feature = "pbr_specular_textures")]
462-
#[texture(29)]
463-
#[sampler(30)]
464464
pub specular_tint_texture: Option<Handle<Image>>,
465465

466466
/// An extra thin translucent layer on top of the main PBR layer. This is

0 commit comments

Comments
 (0)