Advanced search tips: use spaces to require multiple terms (AND), | for alternatives (OR), wrap phrases in quotes (="a b"), =term for exact match, 'term to include, !term to exclude, ^term to match prefix, !^term to exclude prefix, .ext$ to match suffix, and !.ext$ to exclude suffix.

pbr_prepass_functions.wgsl

Import path

Constants

PREMULTIPLIED_ALPHA_CUTOFF

#
const 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 ( )

calculate_motion_vector

#

Shader defs requirments:

🟢 MOTION_VECTOR_PREPASS

fn calculate_motion_vector (
world_position: vec4<f32>
previous_world_position: vec4<f32>
) -> vec2<f32>