D_GGX
Implements the GGX Normal Distribution Function (NDF), used to simulate the distribution of microfacet normals in PBR materials, which determines the shape and sharpness of specular highlights.
Core Advantages
Provides a physically realistic 'long-tail' highlight model, while encapsulating a robust mathematical implementation into a modular node that is easy to combine and use.
Common Uses
Calculating direct lighting highlights for PBR materials
As a foundational module for implementing anisotropic shading
For visualizing and debugging the PBR Normal Distribution Function
How to adjust
The node's output is controlled by `alpha` (typically `roughness` squared) and `dotNH` (the dot product of the normal and the half-vector). Increasing `alpha` makes the highlight wider and softer, while `dotNH` determines the highlight's specific intensity on the surface based on the lighting and viewing angles.
Code Examples
1// 'alpha' is typically roughness * roughness
2// 'dotNH' is the dot product of the normal and half-vector
3const D = D_GGX.call( { alpha, dotNH } );