From e74b5be45d03025619640b11b6137430e81ad92b Mon Sep 17 00:00:00 2001 From: Charlotte McElwain Date: Fri, 11 Jul 2025 10:33:12 -0700 Subject: [PATCH] Ci. --- crates/bevy_pbr/src/material.rs | 18 +++++++----------- crates/bevy_sprite/src/mesh2d/material.rs | 18 +++++++----------- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/crates/bevy_pbr/src/material.rs b/crates/bevy_pbr/src/material.rs index 50959fb46d..91afe1b21c 100644 --- a/crates/bevy_pbr/src/material.rs +++ b/crates/bevy_pbr/src/material.rs @@ -459,19 +459,15 @@ impl SpecializedMeshPipeline for MaterialPipelineSpecializer { .pipeline .mesh_pipeline .specialize(key.mesh_key, layout)?; - descriptor.vertex.shader_defs.push( - ShaderDefVal::UInt( + descriptor.vertex.shader_defs.push(ShaderDefVal::UInt( + "MATERIAL_BIND_GROUP".into(), + MATERIAL_BIND_GROUP_INDEX as u32, + )); + if let Some(ref mut fragment) = descriptor.fragment { + fragment.shader_defs.push(ShaderDefVal::UInt( "MATERIAL_BIND_GROUP".into(), MATERIAL_BIND_GROUP_INDEX as u32, - ) - ); - if let Some(ref mut fragment) = descriptor.fragment { - fragment.shader_defs.push( - ShaderDefVal::UInt( - "MATERIAL_BIND_GROUP".into(), - MATERIAL_BIND_GROUP_INDEX as u32, - ) - ); + )); }; if let Some(vertex_shader) = self.properties.get_shader(MaterialVertexShader) { descriptor.vertex.shader = vertex_shader.clone(); diff --git a/crates/bevy_sprite/src/mesh2d/material.rs b/crates/bevy_sprite/src/mesh2d/material.rs index 8f03ce9b6a..e30cb4d042 100644 --- a/crates/bevy_sprite/src/mesh2d/material.rs +++ b/crates/bevy_sprite/src/mesh2d/material.rs @@ -451,19 +451,15 @@ where layout: &MeshVertexBufferLayoutRef, ) -> Result { let mut descriptor = self.mesh2d_pipeline.specialize(key.mesh_key, layout)?; - descriptor.vertex.shader_defs.push( - ShaderDefVal::UInt( + descriptor.vertex.shader_defs.push(ShaderDefVal::UInt( + "MATERIAL_BIND_GROUP".into(), + MATERIAL_2D_BIND_GROUP_INDEX as u32, + )); + if let Some(ref mut fragment) = descriptor.fragment { + fragment.shader_defs.push(ShaderDefVal::UInt( "MATERIAL_BIND_GROUP".into(), MATERIAL_2D_BIND_GROUP_INDEX as u32, - ) - ); - if let Some(ref mut fragment) = descriptor.fragment { - fragment.shader_defs.push( - ShaderDefVal::UInt( - "MATERIAL_BIND_GROUP".into(), - MATERIAL_2D_BIND_GROUP_INDEX as u32, - ) - ); + )); } if let Some(vertex_shader) = &self.vertex_shader { descriptor.vertex.shader = vertex_shader.clone();