This is a basic CPU ray tracer capable of rendering 3D scenes composed of triangles and spheres with lighting and shadows. The ray tracer supports Phong shading, interpolated vertex normals, per-light visibility via shadow rays, and global ambient lighting. It renders still images at 640×480 resolution using a camera with a fixed field of view. The entire pipeline was implemented on the CPU without shaders or OpenGL rendering logic, apart from final image display. This project demonstrated core principles of ray casting, geometric intersection, and physically based lighting models.
The ray tracer was built in C++, using a custom pipeline to simulate realistic lighting. Rays were traced backward from each pixel to compute intersections with spheres and triangles, where lighting was evaluated using the Phong reflection model. Vertex attributes such as normals and material properties were interpolated using barycentric coordinates, allowing for smooth shading on triangles. Shadow rays were used to compute per-light occlusion.
Output scenes were defined in plain-text description files, and results were written directly to screen or JPEG images.