2 mesh_view_bindings::globals, 4 forward_io::VertexOutput, 7struct ShowPrepassSettings { 10 show_motion_vectors: u32, 14@group(#{MATERIAL_BIND_GROUP}) @binding(0) var<uniform> settings: ShowPrepassSettings; 19 @builtin(sample_index) sample_index: u32, 22) -> @location(0) vec4<f32> { 24 let sample_index = 0u; 26 if settings.show_depth == 1u { 27 let depth = bevy_pbr::prepass_utils::prepass_depth(mesh.position, sample_index); 28 return vec4(depth, depth, depth, 1.0); 29 } else if settings.show_normals == 1u { 30 let normal = bevy_pbr::prepass_utils::prepass_normal(mesh.position, sample_index); 31 return vec4(normal, 1.0); 32 } else if settings.show_motion_vectors == 1u { 33 let motion_vector = bevy_pbr::prepass_utils::prepass_motion_vector(mesh.position, sample_index); 34 return vec4(motion_vector / globals.delta_time, 0.0, 1.0);