4 view_transformations::position_world_to_clip, 7#import bevy_water::water_functions as water_fn 9#import bevy_water::water_bindings 10#ifdef PREPASS_PIPELINE 11#import bevy_pbr::prepass_io::{Vertex, VertexOutput} 13#import bevy_pbr::forward_io::{Vertex, VertexOutput} 17fn vertex(vertex: Vertex) -> VertexOutput { 18 var out: VertexOutput; 21 var model = skinning::skin_model(vertex.joint_indices, vertex.joint_weights); 23 var model = mesh_functions::get_world_from_local(vertex.instance_index); 28 out.world_normal = skinning::skin_normals(model, vertex.normal); 30 out.world_normal = mesh_functions::mesh_normal_local_to_world( 37 let world_position = mesh_functions::mesh_position_local_to_world(model, vec4<f32>(vertex.position, 1.0)); 42 let w_pos = water_fn::uv_to_coord(vertex.uv); 43 height = water_fn::get_wave_height(w_pos); 46 out.world_position = world_position + vec4<f32>((out.world_normal * height), 0.); 47 out.position = position_world_to_clip(out.world_position.xyz); 54 out.world_tangent = mesh_functions::mesh_tangent_local_to_world( 62 out.color = vertex.color; 65#ifdef VERTEX_OUTPUT_INSTANCE_INDEX 66 out.instance_index = vertex.instance_index;