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

FLOAT_MAX

#
const FLOAT_MAX: f32 = 3.40282347e+38

Structures

EnvironmentMapLight

#
struct EnvironmentMapLight {
diffuse: vec3<f32> ,
specular: vec3<f32> ,
}

EnvironmentMapRadiances

#
struct EnvironmentMapRadiances {
irradiance: vec3<f32> ,
radiance: vec3<f32> ,
}

MultiscatterResult

#
struct MultiscatterResult {
FssEss: vec3<f32> ,
FmsEms: vec3<f32> ,
Edss: vec3<f32> ,
}

Functions

compute_cubemap_sample_dir

#
  • parallax_correct is true if parallax correction is to be applied and false otherwise.
fn compute_cubemap_sample_dir (
world_ray_origin: vec3<f32>
, 
world_ray_direction: vec3<f32>
, 
light_from_world: mat4x4<f32>
, 
parallax_correction_bounds: vec3<f32>
, 
parallax_correct: bool
, 
view_rotation: vec4<f32>
) -> vec3<f32>

compute_radiances

#
fn compute_radiances (
input: LayerLightingInput
, 
clusterable_object_index_ranges: ptr<function, ClusterableObjectIndexRanges>
, 
world_position: vec3<f32>
, 
found_diffuse_indirect: bool
) -> EnvironmentMapRadiances
fn compute_radiances (
input: LayerLightingInput
, 
clusterable_object_index_ranges: ptr<function, ClusterableObjectIndexRanges>
, 
world_position: vec3<f32>
, 
found_diffuse_indirect: bool
) -> EnvironmentMapRadiances

environment_map_light_clearcoat

#

Adds the environment map light from the clearcoat layer to that of the base layer.

fn environment_map_light_clearcoat (
out: ptr<function, EnvironmentMapLight>
, 
input: ptr<function, LightingInput>
, 
clusterable_object_index_ranges: ptr<function, ClusterableObjectIndexRanges>
, 
found_diffuse_indirect: bool
)

compute_multiscatter

#

We initially used this (https://bruop.github.io/ibl) reference with Roughness Dependent Fresnel, but it made fresnel very bright so we reverted to the “typical” fresnel term.

fn compute_multiscatter (
F0: vec3<f32>
, 
F_ab: vec2<f32>
, 
Ems: f32
, 
specular_occlusion: f32
) -> MultiscatterResult

environment_map_light

#
fn environment_map_light (
input: ptr<function, LightingInput>
, 
clusterable_object_index_ranges: ptr<function, ClusterableObjectIndexRanges>
, 
found_diffuse_indirect: bool
) -> EnvironmentMapLight

radiance_sample_direction

#
fn radiance_sample_direction (
N: vec3<f32>
, 
R: vec3<f32>
, 
roughness: f32
) -> vec3<f32>
Contents