Master the fundamental concepts of modern graphics apis (low level) through this focused micro-challenge.
Forward rendering draws each object and lights it in the same pass. With 100 lights and 1000 objects, you risk 100,000 lighting calculations, most wasted because each light affects only a small screen region.
Deferred rendering (Michael Deering, 1988; popularized by Killzone 2) splits work into two passes:
Lighting cost depends on screen resolution and light count, not triangle count. A million-triangle scene with few lights runs as fast as a hundred-triangle scene.
cLoading…
For example, a dynamic point light touches maybe 5% of screen pixels; deferred shades only those instead of every object surface. Tradeoffs include high G-buffer bandwidth, difficult MSAA, and transparency requiring a forward pass afterward. Modern engines add tiled deferred to cull lights per screen tile.
You will simulate the geometry pass by populating a tiny G-buffer from vertex data. This task asks you to write position, normal, and albedo per pixel without computing lighting. The G-buffer layout you build here is what RenderDoc shows when debugging deferred renderers in Unreal or id Tech.
Write a C program that simulates a deferred rendering geometry pass.
Requirements:
Three hints are available for this task, revealed one at a time inside the code workspace so you can struggle productively before seeing them.
Every task includes starter code, theory, and hidden tests so you can implement and verify locally in the browser.
How it works