DFGApprox
Calculates the DFG (Distribution, Fresnel, Geometry) term for PBR specular environment lighting, providing a high-quality, texture-free approximation of the split-sum integral.
Core Advantages
Its core advantage is being textureless, eliminating the need for a pre-computed DFG/BRDF LUT texture. This saves memory, avoids texture sampling issues, and provides an accurate PBR environment reflection correction with very high performance.
Common Uses
Calculating environment specular reflections for standard PBR materials
As a fundamental building block for custom PBR shaders
For visualizing and learning PBR theory
How to adjust
The node's output is determined by its two inputs: `roughness` and `dotNV` (the dot product of the normal and view vectors). Changing these input values controls the environment reflection effect for different roughness levels and viewing angles.
Code Examples
1// Get the DFG scale and bias
2const dfg = DFGApprox.call( { roughness, dotNV } );
3
4// Correct the pre-filtered environment map sample
5const specularIBL = envMapSample.mul( dfg.x ).add( dfg.y );