Skip to content

MauroDeryckere/GraphicsProgramming-DualRasterizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dual Rasterizer

A software (CPU) and hardware (GPU) rasterizer built with C++ and DirectX 11. You can switch between both rasterizers at runtime and change various render settings on the fly.

Table of Contents

Screenshots

Software Rasterizer

Software rasterizer - combined shading

Hardware Rasterizer

Hardware rasterizer - with fire mesh

Debug Views

Depth buffer visualization Bounding box visualization

Features

Software Rasterizer

  • Full rasterization pipeline on the CPU (vertex transformation, triangle rasterization, depth testing, pixel shading)
  • Lambert diffuse + Phong specular shading (BRDF)
  • Normal mapping
  • Multiple shading/debug modes: observed area, diffuse only, specular only, combined
  • Depth buffer visualization
  • Bounding box visualization

Hardware Rasterizer

  • DirectX 11 rendering pipeline
  • HLSL pixel shading (same lighting model as software)
  • Texture sampling modes: point, linear, anisotropic

Shared

  • Toggle between software and hardware rasterizer (F1)
  • Cull mode cycling: back, front, none
  • Camera with mouse look and keyboard movement
  • OBJ mesh loading with diffuse, normal, specular and glossiness textures
  • Custom math library (vectors, matrices)
  • Fire mesh with partial coverage (alpha blending)

Controls

Camera
WASD / Arrows: Move
LShift: Sprint
RMB: Rotate
LMB: Rotate horizontally, move forward/backward
RMB + LMB: Move up/down

Settings
F1: Toggle software/hardware rasterizer
F2: Toggle rotation
F3: Toggle fire mesh
F4: Cycle sampler state (hardware only)
F5: Cycle shading mode (software only)
F6: Toggle normal mapping (software only)
F7: Toggle depth buffer display (software only)
F8: Toggle bounding boxes (software only)
F9: Cycle cull mode
F10: Toggle uniform clear color
F11: Toggle FPS display

Building

The project uses CMake.

cmake -S . -B build
cmake --build build

Requires the DirectX 11 SDK (Windows).

About

Software (CPU) and hardware (GPU) Directx11 rasterizer project. You're able to change render settings and switch between software and hardware at runtime.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages