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.

pbr_ambient.wgsl

Import path

Functions

ambient_light

#

A precomputed NdotV is provided because it is computed regardless, but world_normal and the view vector V are provided separately for more advanced uses.

fn ambient_light (
world_position: vec4<f32>
world_normal: vec3<f32>
NdotV: f32
diffuse_color: vec3<f32>
specular_color: vec3<f32>
perceptual_roughness: f32
occlusion: vec3<f32>
) -> vec3<f32>