GRAPHICS · USC 3D Graphics & Rendering · Spring 2026
Ray Tracer & Software Rasterizer in C++
Two rendering pipelines in C++ driven by USD, OBJ, and STL scene and mesh files. A recursive ray tracer with sphere, plane, and triangle-mesh intersection, Phong and reflective shading, and BVH acceleration; and a software rasterizer mirroring the OpenGL pipeline, with programmable vertex and fragment shaders, six-plane frustum clipping, perspective-correct interpolation, and z-buffered depth testing.
- C++
- Ray Tracing
- Rasterization
- BVH
- Shaders
- USD
- OBJ
- STL
Why this is here
Simulation and perception both rest on the same geometry: rays, cameras, transforms, and visibility. In USC’s 3D Graphics & Rendering course I implemented both ways of turning a 3D scene into an image, in C++.
Scene input
Both renderers are driven by standard scene and geometry formats. I parsed scene and mesh descriptions from USD, OBJ, and STL files.
Ray tracer
- Ray intersection with spheres, planes, and triangle meshes.
- Phong shading, plus reflective surfaces using recursive reflection rays.
- A bounding-volume hierarchy (BVH) to accelerate intersection tests on meshes.
Software rasterizer
A simulated GPU pipeline that mirrors the OpenGL model:
- Programmable vertex and fragment shaders.
- Triangle clipping against all six frustum planes.
- Perspective-correct attribute interpolation.
- Z-buffered depth testing.
Scope
Course project. Renders will be added to this page.