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

flip_z

#
const flip_z: vec3<f32> = vec3<f32>(1.0, 1.0, -1.0)

Functions

fetch_point_shadow

#
fn fetch_point_shadow (
light_id: u32
, 
frag_position: vec4<f32>
, 
surface_normal: vec3<f32>
, 
frag_coord_xy: vec2<f32>
) -> f32

fetch_spot_shadow

#
fn fetch_spot_shadow (
light_id: u32
, 
frag_position: vec4<f32>
, 
surface_normal: vec3<f32>
, 
near_z: f32
, 
frag_coord_xy: vec2<f32>
) -> f32

get_cascade_index

#
fn get_cascade_index (
light_id: u32
, 
view_z: f32
) -> u32

world_to_directional_light_local

#

The depth is stored in the return value’s z coordinate. If the return value’s w coordinate is 0.0, then we landed outside the shadow map entirely.

fn world_to_directional_light_local (
light_id: u32
, 
cascade_index: u32
, 
offset_position: vec4<f32>
) -> vec4<f32>

sample_directional_cascade

#
fn sample_directional_cascade (
light_id: u32
, 
cascade_index: u32
, 
frag_position: vec4<f32>
, 
surface_normal: vec3<f32>
, 
frag_coord_xy: vec2<f32>
) -> f32

fetch_directional_shadow

#
fn fetch_directional_shadow (
light_id: u32
, 
frag_position: vec4<f32>
, 
surface_normal: vec3<f32>
, 
view_z: f32
, 
frag_coord_xy: vec2<f32>
) -> f32

cascade_debug_visualization

#
fn cascade_debug_visualization (
output_color: vec3<f32>
, 
light_id: u32
, 
view_z: f32
) -> vec3<f32>
Contents