Frostbite physically based rendering
The Frostbite engine's PBR recipe: GGX specular with height-correlated Smith, Disney-style diffuse, photometric light units, and a consistent IBL and area-light pipeline. Its course notes are the reference for shipping PBR in a game engine.
In the family Materials, BRDFs & texturing, engine PBR pipeline
Where it runs
Built inOfficial add-onPluginNone foundNot researched
| Engine | Support | How |
|---|---|---|
| three.js r187 | None found | |
| Babylon.js 9.38.0 | Built in | PBRMaterial combines Burley diffuse, GGX NDF, height-correlated Smith visibility (smithVisibility_GGXCorrelated), and photometric light units docs |
| Godot 4.7 | None found | BaseMaterial3D offers Burley diffuse and Schlick-GGX specular, not the full Frostbite PBR recipe with area-light normalization. |
| Unity | Built in | HDRP Lit and Lighting pipeline (follows Moving Frostbite to PBR: physical light units, renormalized DisneyDiffuse, height-correlated Smith GGX) docs HDRP lighting and BSDF follow Lagarde and de Rousiers' Frostbite PBR model. |
| Unreal 5.7 | None found | |
| Blender 5.2 | None found | |
| WebGPU W3C | None found | |
| Metal | None found |
How it works
The notes document a full engine-level pipeline rather than a single BRDF. Materials use a base colour/metalness/reflectance/smoothness parameterisation with a remap from artist roughness to GGX alpha. Direct lighting evaluates GGX with the height-correlated Smith visibility term and a Frostbite-tuned diffuse (a Disney variant with energy normalisation). Lights are specified in physical photometric units (lumens, lux, nits) with exposure applied afterwards, and area lights use representative-point or LTC-style approximations. IBL uses pre-filtered specular cubemaps and a split-sum BRDF LUT with a dominant-direction correction for rough reflections, and diffuse from pre-integrated irradiance. The text also covers unit conversion, occlusion handling and specular occlusion.
When to choose it
Reach for it when
- need a checklist for shipping pbr in a game engine
- lighting units and roughness remapping are inconsistent
- specular occlusion and ibl prefiltering questions
- auditing my game's physically based pipeline
- area lights and ibl don't match in brightness
Choose it as a checklist when building or auditing a game PBR pipeline: units, roughness remapping, specular occlusion, IBL pre-filtering. Prefer Disney principled BRDF when you want the artist parameter philosophy instead of an engine recipe, and OpenPBR Surface for offline interchange.
Field marks
- Split-sum IBL assumes view = normal, so stretched reflections at grazing angles and on rough surfaces are too short
- Pre-filtered cubemaps are box-parallax-free; interiors need local probes or reflections look detached
- Photometric exposure workflows break when artists or tonemappers assume sRGB-ranged lights
- Single-scatter specular loses energy at high roughness; add kulla-conty-multiscatter
Presets
Frostbite PBR spheres: dielectric and gold, roughness sweep
{
"ROUGH_MIN": 0.08
}Show GLSL (53 lines)
// Frostbite-style PBR: GGX + height-correlated Smith visibility + Burley diffuse with the energy-conserving
// bias/factor. Top row dielectric, bottom row gold metal, roughness 0.08 -> 1.0 left to right.
const float ROUGH_MIN = 0.08;
const vec3 ALBEDO = vec3(0.75, 0.12, 0.1);
const vec3 METAL_F0 = vec3(1.0, 0.77, 0.34);
const vec3 L_DIR = vec3(0.5, 0.7, 0.6);
vec3 env(vec3 d) {
vec3 c = mix(vec3(0.12, 0.1, 0.1), vec3(0.4, 0.55, 0.85), smoothstep(-0.3, 0.8, d.y));
return c + vec3(3.0) * pow(max(dot(d, normalize(L_DIR)), 0.0), 50.0);
}
float visSmith(float nl, float nv, float a) {
float a2 = a * a;
float gv = nl * sqrt((-nv * a2 + nv) * nv + a2);
float gl = nv * sqrt((-nl * a2 + nl) * nl + a2);
return 0.5 / max(gv + gl, 1e-4);
}
vec3 shade(vec3 n, vec3 v, float rough, float metal) {
vec3 l = normalize(L_DIR); vec3 h = normalize(v + l);
float nl = clamp(dot(n, l), 1e-3, 1.0), nv = max(dot(n, v), 1e-3);
float nh = clamp(dot(n, h), 0.0, 1.0), lh = clamp(dot(l, h), 0.0, 1.0);
float a = rough * rough; float d = nh * nh * (a * a - 1.0) + 1.0;
float D = a * a / (3.14159 * d * d);
vec3 f0 = mix(vec3(0.04), METAL_F0, metal);
vec3 F = f0 + (1.0 - f0) * pow(1.0 - lh, 5.0);
vec3 spec = D * visSmith(nl, nv, a) * F;
float eb = mix(0.0, 0.5, rough), ef = mix(1.0, 1.0 / 1.51, rough);
float fd90 = eb + 2.0 * lh * lh * rough;
float fd = (1.0 + (fd90 - 1.0) * pow(1.0 - nl, 5.0)) * (1.0 + (fd90 - 1.0) * pow(1.0 - nv, 5.0)) * ef;
vec3 diff = (1.0 - metal) * ALBEDO * fd / 3.14159;
vec3 amb = env(n) * ALBEDO * (1.0 - metal) * 0.5;
vec3 fr = f0 + (max(vec3(1.0 - rough), f0) - f0) * pow(1.0 - nv, 5.0);
amb += env(reflect(-v, n)) * fr * (1.0 - 0.5 * rough);
return (diff + spec) * nl * 3.14159 * 1.4 + amb;
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
vec3 ro = vec3(0.0, 0.0, 4.0), rd = normalize(vec3(uv, -1.6));
vec3 col = env(rd) * 0.35; float best = 1e9;
for (int j = 0; j < 2; j++) for (int i = 0; i < 5; i++) {
vec3 c = vec3((float(i) - 2.0) * 0.5, j == 0 ? 0.28 : -0.28, 0.0);
vec3 oc = ro - c; float b = dot(oc, rd); float hh = b * b - dot(oc, oc) + 0.23 * 0.23;
if (hh < 0.0) continue;
float t = -b - sqrt(hh);
if (t > 0.0 && t < best) {
best = t; vec3 n = normalize(ro + rd * t - c);
col = shade(n, -rd, mix(ROUGH_MIN, 1.0, float(i) / 4.0), j == 0 ? 0.0 : 1.0);
}
}
col = col / (1.0 + col);
fragColor = vec4(pow(col, vec3(1.0 / 2.2)), 1.0);
}
Attribution: written for this index
Measured GPU weight & timing
| Preset | GPU | Weight / p50 / p95 | Method |
|---|---|---|---|
| frostbite-pbr-specimen | Tesla T4 1920x1080 | 3.63× baseline (light) · 0.119 ms / 0.126 ms | opengl-timer-query · 40 frames · GPU Weight Atlas · Colab T4 sweep |
| frostbite-pbr-specimen | NVIDIA L4 1920x1080 | 2.82× baseline (light) · 0.045 ms / 0.045 ms · 2.7× faster on L4 | opengl-timer-query · Cross-architecture validation |
| frostbite-pbr-specimen | NVIDIA A100-SXM4-40GB 1920x1080 | 2.22× baseline (light) · 0.064 ms / 0.064 ms · 1.9× faster on A100 | opengl-timer-query · Cross-architecture validation |
Lineage
Sources
- primarySébastien Lagarde, Charles de Rousiers. Moving Frostbite to Physically Based Rendering. SIGGRAPH 2014 course.Verified via live page · 2026-11-29