1#define_import_path bevy_pbr::mesh_functions 3fn mesh_position_local_to_world(model: mat4x4<f32>, vertex_position: vec4<f32>) -> vec4<f32> { 4 return model * vertex_position; 7fn mesh_position_world_to_clip(world_position: vec4<f32>) -> vec4<f32> { 8 return view.view_proj * world_position; 14fn mesh_position_local_to_clip(model: mat4x4<f32>, vertex_position: vec4<f32>) -> vec4<f32> { 15 let world_position = mesh_position_local_to_world(model, vertex_position); 16 return mesh_position_world_to_clip(world_position); 19fn mesh_normal_local_to_world(vertex_normal: vec3<f32>) -> vec3<f32> { 21 mesh.inverse_transpose_model[0].xyz, 22 mesh.inverse_transpose_model[1].xyz, 23 mesh.inverse_transpose_model[2].xyz 27fn mesh_tangent_local_to_world(model: mat4x4<f32>, vertex_tangent: vec4<f32>) -> vec4<f32> { 33 ) * vertex_tangent.xyz,