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.

mesh_functions.wgsl

Import path

Functions

get_world_from_local

#
fn get_world_from_local (
instance_index: u32
) -> mat4x4<f32>

get_previous_world_from_local

#
fn get_previous_world_from_local (
instance_index: u32
) -> mat4x4<f32>

get_local_from_world

#
fn get_local_from_world (
instance_index: u32
) -> mat4x4<f32>

mesh_position_local_to_world

#
fn mesh_position_local_to_world (
world_from_local: mat4x4<f32>
vertex_position: vec4<f32>
) -> vec4<f32>

mesh_position_local_to_clip

#

NOTE: The intermediate world_position assignment is important for precision purposes when using the ‘equals’ depth comparison function.

fn mesh_position_local_to_clip (
world_from_local: mat4x4<f32>
vertex_position: vec4<f32>
) -> vec4<f32>

mesh_normal_local_to_world

#
fn mesh_normal_local_to_world (
vertex_normal: vec3<f32>
instance_index: u32
) -> vec3<f32>

sign_determinant_model_3x3m

#

Calculates the sign of the determinant of the 3x3 model matrix based on a mesh flag

fn sign_determinant_model_3x3m (
mesh_flags: u32
) -> f32

mesh_tangent_local_to_world

#
fn mesh_tangent_local_to_world (
world_from_local: mat4x4<f32>
vertex_tangent: vec4<f32>
instance_index: u32
) -> vec4<f32>

get_visibility_range_dither_level

#

Shader defs requirments:

🟢 VISIBILITY_RANGE_DITHER

fn get_visibility_range_dither_level (
instance_index: u32
world_position: vec4<f32>
) -> i32

get_tag

#
fn get_tag (
instance_index: u32
) -> u32