← back to portfolio
yanghyunw00.github.io / portfolio.txt / academic / post-processing.txt

Depth Buffer & Post-Processing Pipeline

DigiPen CS200 Computer Graphics I
course DigiPen CS200 stack C++ · OpenGL · ImGui

# Overview


This assignment is a from-scratch project (no starter code) implementing depth buffer rendering and a multi-stage post-processing pipeline over a custom 2D diorama scene. Opaque and transparent objects are rendered with different depth-test rules, the scene is rendered into an MSAA offscreen framebuffer, and a chain of full-screen shader passes applies gamma correction, chromatic aberration, sharpening, and a distance-based dilation (bloom-like) effect.

# Tasks Completed


# Reflection


Previous assignments always came with starter code, but this one required designing framebuffer management, depth/blend state transitions, and the post-processing chaining structure entirely from scratch, so the harder question was less "what to build" and more "how to keep the state from breaking." In particular, it took time to understand why the opaque pass writes depth with glDepthMask(GL_TRUE), while the transparent pass turns depth writes off with glDepthMask(GL_FALSE) but keeps depth testing on — transparent objects need to be occluded by already-drawn opaque objects, but must not corrupt the depth buffer against each other. Resolving an MSAA framebuffer into a regular texture (glBlitFramebuffer), and chaining one post-processing effect's output into the next effect's input through a ping-pong framebuffer structure, were both concepts I was handling for the first time and made debugging tricky — but isolating each stage and displaying its texture directly on screen to verify it made the whole pipeline's flow clear.

# Demo


Live WebAssembly build — interact with it directly in the frame above.

← back to portfolio