Shaders
Linear Algebra on the GPU
Shaders lessons
Vertex Transformation Pipeline
Live: Basis Change / Space Transform
Drag to morph between world space and object space. The yellow point stays fixed — the coordinate grid transforms around it. This is exactly what Model, View, and Projection matrices do:
Perspective Projection: Why Divide by Z
The projection matrix divides y by z — farther objects get smaller. Watch the yellow point project onto the near plane as you push it deeper:
Phong and Blinn-Phong
Cook-Torrance PBR
Interactive: GGX Specular Lobe
The GGX NDF controls specular spread. Low roughness = tight mirror. High roughness = wide diffuse-like shape:
Interactive: Fresnel Curve
Schlick approximation: reflectance increases at grazing angles. F0=0.04 for dielectrics, 0.7+ for metals:
BRDF Polar Response Plot
For a given incoming light direction and roughness, this polar plot shows how much light reflects in each outgoing direction. Low roughness = tight specular peak near mirror angle. High roughness = wide scatter: