environment_map.wgsl
Import path
Constants
Structures
Functions
Shader defs requirments:
š¢ MULTIPLE_LIGHT_PROBES_IN_ARRAY
fn
compute_radiances
(
input:
LayerLightingInput
,
clusterable_object_index_ranges:
ptr<function, ClusterableObjectIndexRanges>
,
world_position:
vec3<f32>
,
found_diffuse_indirect:
bool
)
->
EnvironmentMapRadiances
Shader defs requirments:
š“ MULTIPLE_LIGHT_PROBES_IN_ARRAY
fn
compute_radiances
(
input:
LayerLightingInput
,
clusterable_object_index_ranges:
ptr<function, ClusterableObjectIndexRanges>
,
world_position:
vec3<f32>
,
found_diffuse_indirect:
bool
)
->
EnvironmentMapRadiances
Shader defs requirments:
š¢ STANDARD_MATERIAL_CLEARCOAT
Adds the environment map light from the clearcoat layer to that of the base layer.
fn
environment_map_light_clearcoat
(
,
input:
ptr<function, LightingInput>
,
clusterable_object_index_ranges:
ptr<function, ClusterableObjectIndexRanges>
,
found_diffuse_indirect:
bool
)
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
fn
environment_map_light
(
input:
ptr<function, LightingInput>
,
clusterable_object_index_ranges:
ptr<function, ClusterableObjectIndexRanges>
,
found_diffuse_indirect:
bool
)
->
EnvironmentMapLight
“Moving Frostbite to Physically Based Rendering 3.0”, listing 22 https://seblagarde.wordpress.com/wp-content/uploads/2015/07/course_notes_moving_frostbite_to_pbr_v32.pdf#page=70
parallax_correctis true if parallax correction is to be applied and false otherwise.