[[block]] struct PushConstants { index: u32; double: vec2; }; var pc: PushConstants; struct FragmentIn { [[location(0)]] color: vec4; [[builtin(primitive_index)]] primitive_index: u32; }; [[stage(fragment)]] fn main(in: FragmentIn) -> [[location(0)]] vec4 { if (in.primitive_index % 2u == 0u) { return in.color; } else { return vec4(vec3(1.0) - in.color.rgb, in.color.a); } }