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.

material.wgsl

Functions

vertex

#
@vertex
Processes each 3D point in a model before it's drawn
fn vertex (
vertex: Vertex
) -> SurfaceVertexOutput

prepare_surface_foam

#
fn prepare_surface_foam (
surface_lod: u32
foam_density: f32
lighting_distance: f32
) -> FoamState

directional_scatter

#
fn directional_scatter (
surface_lod: u32
to_view: vec3<f32>
mode: u32
) -> vec3<f32>

shade_water_body

#
fn shade_water_body (
to_view: vec3<f32>
input_body: vec3<f32>
mode: u32
) -> BodyLightingState

shade_environment_and_sun

#
fn shade_environment_and_sun (
world_position: vec3<f32>
surface_level: f32
body_lighting: BodyLightingState
to_view: vec3<f32>
) -> vec3<f32>

shade_local_lights

#
fn shade_local_lights (
body_lighting: BodyLightingState
to_view: vec3<f32>
reflected_input: vec3<f32>
mode: u32
) -> LocalLightingState

compose_water

#
fn compose_water (
body_lighting: BodyLightingState
to_view: vec3<f32>
far_water: vec3<f32>
far_tier: f32
mode: u32
) -> vec4<f32>

fragment

#
@fragment
Calculates the final color of each pixel on the screen
fn fragment ( ) ->
@location(0)
vec4<f32>