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.

Functions

getDistanceAttenuation

#

light radius is a non-physical construct for efficiency purposes, because otherwise every light affects every fragment in the scene

fn getDistanceAttenuation (
distanceSquare: f32,
inverseRangeSquared: f32
) -> f32

D_GGX

#

V_SmithGGXCorrelated

#

Visibility function (Specular G) V(v,l,a) = G(v,l,α) / { 4 (n⋅v) (n⋅l) } such that f_r becomes f_r(v,l) = D(h,α) V(v,l,α) F(v,h,f0) where V(v,l,α) = 0.5 / { n⋅l sqrt((n⋅v)^2 (1−α2) + α2) + n⋅v sqrt((n⋅l)^2 (1−α2) + α2) } Note the two sqrt’s, that may be slow on mobile, see https://google.github.io/filament/Filament.html#listing_approximatedspecularv

fn V_SmithGGXCorrelated (
roughness: f32,
NoV: f32,
NoL: f32
) -> f32

F_Schlick_vec

#

F_Schlick

#

fresnel

#

specular

#

Cook-Torrance approximation of the microfacet model integration using Fresnel law F to model f_m f_r(v,l) = { D(h,α) G(v,l,α) F(v,h,f0) } / { 4 (n⋅v) (n⋅l) }

fn specular (
f0: vec3<f32>,
roughness: f32,
h: vec3<f32>,
NoV: f32,
NoL: f32,
NoH: f32,
LoH: f32,
specularIntensity: f32
) -> vec3<f32>

Fd_Burley

#

EnvBRDFApprox

#

perceptualRoughnessToRoughness

#

reinhard

#

reinhard_extended

#

luminance

#

change_luminance

#

reinhard_luminance

#

reinhard_extended_luminance

#

point_light

#

spot_light

#

directional_light

#
Contents