diff --git a/crates/bevy_pbr/src/pbr_material.rs b/crates/bevy_pbr/src/pbr_material.rs index 224bd3ed5c..fd1babd8ec 100644 --- a/crates/bevy_pbr/src/pbr_material.rs +++ b/crates/bevy_pbr/src/pbr_material.rs @@ -32,7 +32,7 @@ pub enum UvChannel { #[derive(Asset, AsBindGroup, Reflect, Debug, Clone)] #[bind_group_data(StandardMaterialKey)] #[data(0, StandardMaterialUniform, binding_array(10))] -#[bindless] +#[bindless(index_table(range(0..31)))] #[reflect(Default, Debug, Clone)] pub struct StandardMaterial { /// The color of the surface of the material before lighting. diff --git a/crates/bevy_pbr/src/render/pbr_bindings.wgsl b/crates/bevy_pbr/src/render/pbr_bindings.wgsl index d5cd3b03c1..fac7b97265 100644 --- a/crates/bevy_pbr/src/render/pbr_bindings.wgsl +++ b/crates/bevy_pbr/src/render/pbr_bindings.wgsl @@ -17,32 +17,24 @@ struct StandardMaterialBindings { normal_map_sampler: u32, // 10 depth_map_texture: u32, // 11 depth_map_sampler: u32, // 12 -#ifdef PBR_ANISOTROPY_TEXTURE_SUPPORTED anisotropy_texture: u32, // 13 anisotropy_sampler: u32, // 14 -#endif // PBR_ANISOTROPY_TEXTURE_SUPPORTED -#ifdef PBR_TRANSMISSION_TEXTURES_SUPPORTED specular_transmission_texture: u32, // 15 specular_transmission_sampler: u32, // 16 thickness_texture: u32, // 17 thickness_sampler: u32, // 18 diffuse_transmission_texture: u32, // 19 diffuse_transmission_sampler: u32, // 20 -#endif // PBR_TRANSMISSION_TEXTURES_SUPPORTED -#ifdef PBR_MULTI_LAYER_MATERIAL_TEXTURES_SUPPORTED clearcoat_texture: u32, // 21 clearcoat_sampler: u32, // 22 clearcoat_roughness_texture: u32, // 23 clearcoat_roughness_sampler: u32, // 24 clearcoat_normal_texture: u32, // 25 clearcoat_normal_sampler: u32, // 26 -#endif // PBR_MULTI_LAYER_MATERIAL_TEXTURES_SUPPORTED -#ifdef PBR_SPECULAR_TEXTURES_SUPPORTED specular_texture: u32, // 27 specular_sampler: u32, // 28 specular_tint_texture: u32, // 29 specular_tint_sampler: u32, // 30 -#endif // PBR_SPECULAR_TEXTURES_SUPPORTED } @group(2) @binding(0) var material_indices: array;