Master the fundamental concepts of modern graphics apis (low level) through this focused micro-challenge.
Vulkan is explicit: the application describes rendering upfront instead of relying on implicit OpenGL state. A render pass defines attachments, subpasses, and dependencies so the driver can optimize memory bandwidth before any draw call runs.
Core components:
A forward pass typically has one color attachment, one depth attachment, and one subpass drawing geometry.
A deferred pass has multiple color attachments (G-buffer: position, normal, albedo), one depth attachment, subpass 0 filling the G-buffer, and subpass 1 reading it for lighting.
Each attachment specifies:
cLoading…
For example, marking a G-buffer attachment DONT_CARE on store tells tile-based mobile GPUs they need not write intermediate data back to VRAM. CLEAR avoids reading uninitialized memory; DONT_CARE enables tile compression on ARM Mali and PowerVR.
You will model a Vulkan render pass with two subpasses for deferred rendering and print its configuration. This task asks you to define attachments with load/store ops and wire subpass dependencies. Explicit render passes are why deferred rendering is affordable on phones, not just desktop GPUs.
Write a C program that models a Vulkan-style render pass with two subpasses (deferred rendering).
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.
All starter code and reference implementations are available for your local setup.
View on Github