1#import bevy_pbr::mesh_functions::{get_world_from_local, mesh_position_local_to_clip} 6@group(2) @binding(0) var<uniform> material: CustomMaterial; 9 @builtin(instance_index) instance_index: u32, 10 @location(0) position: vec3<f32>, 11 @location(1) blend_color: vec4<f32>, 15 @builtin(position) clip_position: vec4<f32>, 16 @location(0) blend_color: vec4<f32>, 20fn vertex(vertex: Vertex) -> VertexOutput { 21 var out: VertexOutput; 22 out.clip_position = mesh_position_local_to_clip( 23 get_world_from_local(vertex.instance_index), 24 vec4<f32>(vertex.position, 1.0), 26 out.blend_color = vertex.blend_color; 31 @location(0) blend_color: vec4<f32>, 35fn fragment(input: FragmentInput) -> @location(0) vec4<f32> { 36 return material.color * input.blend_color;