Search across packages, versions, files, declarations, and comments. Use multiple terms to narrow results (AND), and add @vertex, @fragment, or @compute to filter by shader stage.

Constants

PREMULTIPLIED_ALPHA_CUTOFF

#
const PREMULTIPLIED_ALPHA_CUTOFF: AbstractFloat = 0.05

Functions

prepass_alpha_discard

#

Reusable alpha discard logic suitable for use by custom materials in the prepass. We can use a simplified version of alpha_discard() here since we only need to handle the alpha_cutoff

fn prepass_alpha_discard (
material_flags: u32
, 
alpha_cutoff: f32
, 
output_color: vec4<f32>
)

prepass_sample_color_and_alpha_discard

#

Samples the StandardMaterial’s base color (including the base color texture, if any) and then invokes prepass_alpha_discard with the material’s flags and alpha cutoff.

fn prepass_sample_color_and_alpha_discard (
in: VertexOutput
)

calculate_motion_vector

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