Developer knowledge network ยท moderated exchange

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Knowledge indexLive
4Categories
919Threads
2.8KPosts
Tutorial

Physically Based Rendering (PBR): Cook-Torrance Microfacet Specular BRDF Formulation [StackOverflow Architecture Guide]

shader_magician
HLSL / GLSL Dev
MEMBER
Rep: 176
Join Date: Jan 2021
Posts: 8
Thanks: 32
1 months ago ยท Jul 6, 2026 2:12 PM
#1

The mathematical formula behind realistic metallic and dielectric surface reflections in PBR:

$$f_{\text{Cook-Torrance}} = \frac{D(N, H) \cdot F(V, H) \cdot G(N, V, L)}{4(N \cdot V)(N \cdot L)}$$

  • $D$ (GGX Normal Distribution Function): Simulates microfacet roughness alignment.
  • $F$ (Fresnel-Schlick): Increases reflectance at grazing viewing angles.
  • $G$ (Smith Geometry Shadowing): Accounts for microfacets shadowing each other.

Energy-conserving: material reflections never exceed incoming light energy!

matrix_math_guy
Math Specialist
MEMBER
Rep: 105
Join Date: Aug 2018
Posts: 52
Thanks: 41
1 months ago ยท Jul 6, 2026 8:10 PM
#2

The Cook-Torrance BRDF with GGX distribution is what makes metallic and rough materials look indistinguishable from real life.

graphics_pipeline_pro
DirectX / Vulkan Engineer
MEMBER
Rep: 172
Join Date: Sep 2018
Posts: 10
Thanks: 51
1 months ago ยท Jul 7, 2026 3:56 AM
#3

Clean mathematical breakdown.