#import bevy_pbr::forward_io::VertexOutput struct CustomMaterial { color: vec4<f32>, }; @group(#{MATERIAL_BIND_GROUP}) @binding(0) var<uniform> material: CustomMaterial; @fragment fn fragment( mesh: VertexOutput, ) -> @location(0) vec4<f32> { #ifdef IS_RED return vec4<f32>(1.0, 0.0, 0.0, 1.0); #else return material.color; #endif }