3 view_transformations::position_world_to_clip 6@group(2) @binding(0) var texture: texture_2d<f32>; 7@group(2) @binding(1) var texture_sampler: sampler; 10 @builtin(instance_index) instance_index: u32, 11 @location(0) position: vec3<f32>, 15 @builtin(position) clip_position: vec4<f32>, 16 @location(0) world_position: vec4<f32>, 17 @location(1) color: vec4<f32>, 21fn vertex(vertex: Vertex) -> VertexOutput { 22 var out: VertexOutput; 25 let tag = mesh_functions::get_tag(vertex.instance_index); 26 var world_from_local = mesh_functions::get_world_from_local(vertex.instance_index); 27 out.world_position = mesh_functions::mesh_position_local_to_world(world_from_local, vec4(vertex.position, 1.0)); 28 out.clip_position = position_world_to_clip(out.world_position.xyz); 30 let tex_dim = textureDimensions(texture); 32 let texel_coord = vec2<u32>(tag % tex_dim.x, tag / tex_dim.x); 34 out.color = textureLoad(texture, texel_coord, 0); 41) -> @location(0) vec4<f32> {