Physically Based Rendering Materials
PBR revolutionized game graphics by providing a framework for creating consistent, realistic materials under any lighting condition.
What is PBR?
Physically Based Rendering uses material properties based on real-world physics. Instead of arbitrary values, we use:
- Albedo - Base color (without lighting information)
- Metallic - Whether the surface is metal or dielectric
- Roughness - Surface microsurface detail
- Normal - Surface detail orientation
- Ambient Occlusion - Indirect shadowing
Why PBR Matters
Before PBR, artists had to tweak materials for every lighting scenario. With PBR:
- Materials look correct in all lighting
- Values have physical meaning
- Asset reuse across projects
- Predictable results
[!note] PBR doesn’t automatically make things look good - it just makes them look correct.
The Metallic Workflow
Most engines use the metallic workflow:
vec3 F0 = vec3(0.04);
F0 = mix(F0, albedo, metallic);
// Fresnel-Schlick approximation
vec3 F = F0 + (1.0 - F0) * pow(1.0 - cosTheta, 5.0);
// Cook-Torrance BRDF
float NDF = DistributionGGX(N, H, roughness);
float G = GeometrySmith(N, V, L, roughness);
vec3 numerator = NDF * G * F;
float denominator = 4.0 * max(dot(N, V), 0.0) * max(dot(N, L), 0.0);
vec3 specular = numerator / max(denominator, 0.001);
Common Mistakes
Things I see developers get wrong:
- Using colored metals (albedo should be black for metals)
- Not using linear color space
- Incorrect roughness values (too smooth = plastic)
- Forgetting to gamma correct final output
Texture Authoring
Good PBR textures require attention:
- Albedo: No lighting info, pure color
- Roughness: Variation creates realism
- Metallic: Usually 0 or 1, rarely in between
- Normal: Detail that’s too small to model
Use Substance Designer or Painter for best results.
Performance
PBR is more expensive than simple Blinn-Phong, but worth it:
- Multiple texture lookups
- Complex math in fragment shader
- Higher resolution needed for quality
Optimize by using texture atlases and LOD for distant objects.