diff --git a/assets/shaders/rally_point.wgsl b/assets/shaders/rally_point.wgsl index 80401319..1860f9a8 100644 --- a/assets/shaders/rally_point.wgsl +++ b/assets/shaders/rally_point.wgsl @@ -27,7 +27,8 @@ const FADE: f32 = 3.; fn fragment( in: VertexOutput, ) -> @location(0) vec4 { - let world_space_length: f32 = length(mesh.model[0].xyz); + let model = mesh[in.instance_index].model; + let world_space_length: f32 = length(vec3(model[0][0], model[1][0], model[2][0])); let scaled_x: f32 = in.uv.x * world_space_length; let offset_y: f32 = abs(in.uv.y - 0.5) * POINTINESS; let scaled_time: f32 = globals.time * SPEED;