Back home 🏡 WGSL Spec Bevy WGSL Functions

pbr_prepass_functions.wgsl

Import path

Constants

Name Type Value
PREMULTIPLIED_ALPHA_CUTOFF # AbstractFloat 0.05

Functions

prepass_alpha_discard

#
We can use a simplified version of alpha_discard() here since we only need to handle the alpha_cutoff
fn prepass_alpha_discard(in: VertexOutput)
Parameter Type
in VertexOutput

calculate_motion_vector

#

Shader defs:

🟢 MOTION_VECTOR_PREPASS

fn calculate_motion_vector(world_position: vec4<f32>, previous_world_position: vec4<f32>) -> vec2<f32>
Parameter Type
world_position vec4<f32>
previous_world_position vec4<f32>
Returns: vec2<f32>