BRDF_GGX
Implements the industry-standard Cook-Torrance microfacet BRDF model to calculate the specular highlights for PBR materials.
Core Advantages
Encapsulates complex, physically-based lighting mathematics into a highly abstract node, enabling physically realistic, easy-to-use, and highly extensible specular reflection calculations.
Common Uses
Creating standard PBR materials (e.g., metals, plastics, ceramics)
Implementing anisotropic effects (e.g., brushed metal, varnished wood)
Creating iridescent/pearlescent effects (e.g., soap bubbles, oil slicks)
Serving as a fundamental building block for advanced custom materials
How to adjust
This node's behavior is driven by other nodes connected to its inputs (e.g., `roughness`, `f0`, `f90`). By adjusting these input values, you can change the material's specular properties, such as from matte to mirror-like, or alter the reflection color of a metal.
Code Examples
1// Calculate the specular contribution
2const specular = BRDF_GGX.call( {
3 lightDirection,
4 positionViewDirection,
5 f0,
6 f90,
7 roughness
8} );