2 render::{mesh_view_bindings::globals, forward_io::VertexOutput}, 6struct ShowPrepassSettings { 9 show_motion_vectors: u32, 13@group(constants::MATERIAL_BIND_GROUP) @binding(0) var<uniform> settings: ShowPrepassSettings; 17 @if(MULTISAMPLED) @builtin(sample_index) sample_index: u32, 19) -> @location(0) vec4<f32> { 20 @if(!MULTISAMPLED) let sample_index = 0u; 21 if settings.show_depth == 1u { 22 let depth = bevy_pbr::prepass::utils::prepass_depth(mesh.position, sample_index); 23 return vec4(depth, depth, depth, 1.0); 24 } else if settings.show_normals == 1u { 25 let normal = bevy_pbr::prepass::utils::prepass_normal(mesh.position, sample_index); 26 return vec4(normal, 1.0); 27 } else if settings.show_motion_vectors == 1u { 28 let motion_vector = bevy_pbr::prepass::utils::prepass_motion_vector(mesh.position, sample_index); 29 return vec4(motion_vector / globals.delta_time, 0.0, 1.0);