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.

Structures

SampleBias

#

Biasing info needed to sample from a texture when calling sample_texture. How this is done depends on whether we’re rendering meshlets or regular meshes.

struct SampleBias {
ddx_uv: vec2<f32>, MESHLET_MESH_MATERIAL_PASS
ddy_uv: vec2<f32>, MESHLET_MESH_MATERIAL_PASS
mip_bias: f32, !MESHLET_MESH_MATERIAL_PASS
}

Functions

visibility_range_dither

#

alpha_discard

#

sample_texture

#

prepare_world_normal

#

calculate_tbn_mikktspace

#

apply_normal_mapping

#

bend_normal_for_anisotropy

#

calculate_view

#

NOTE: Correctly calculates the view vector depending on whether the projection is orthographic or perspective.

fn calculate_view (
world_position: vec4<f32>,
is_orthographic: bool
) -> vec3<f32>

calculate_diffuse_color

#

Diffuse strength is inversely related to metallicity, specular and diffuse transmission

fn calculate_diffuse_color (
base_color: vec3<f32>,
metallic: f32,
specular_transmission: f32,
diffuse_transmission: f32
) -> vec3<f32>

calculate_F0

#

apply_pbr_lighting

#

apply_fog

#

premultiply_alpha

#

main_pass_post_lighting_processing

#
Contents