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