top of page

Dual Rasterizer

As part of my Graphics Programming class at DAE, I was tasked with creating a dual rasterizer. The goal was to understand how modern GPUs render images while also building the core functionality of a rasterizer from scratch.

Summary

This project is a custom rendering system that supports both a hardware rasterizer using DirectX 11 and a software rasterizer fully implemented in C++ with SDL. The dual approach gave me the chance to explore both modern GPU pipelines and the fundamentals of how rasterization works at the pixel level. The renderer can switch between hardware and software modes at runtime.

Visual Studio  |  C++  |  DirectX  |  SDL  |  GitHub

Features Implemented

Hardware Rasterizer
  • Device, swap chain, render target, and depth buffer setup

  • Rendering meshes with world-view-projection transforms

  • Support for multiple meshes (vehicle + fire mesh toggle)

  • Proper backbuffer presentation with swap chain

Software Rasterizer
  • Full CPU-side vertex transformations (world → view → projection → screen space)

  • Depth buffer implementation with per-pixel depth testing

  • Triangle rasterization with bounding-box traversal

  • Barycentric coordinate / edge function checks for inside-triangle testing

  • Per-pixel shading

  • Backbuffer management with SDL surfaces

Screenshot 2025-09-07 194631.png

Technical Highlights

  • Implemented triangle rasterization manually using edge functions and barycentric coordinates.

  • Designed a depth buffer system to correctly handle occlusion in software mode.

  • Integrated DirectX11 and SDL in a single application with runtime switching between GPU and CPU rasterization.

  • Applied frustum culling and bounding-box optimizations for efficiency.

Check it out
  • GitHub

​

bottom of page