Skip to content

iwelankar/myfirstraytracer

Repository files navigation

myfirstraytracer

C++ Ray Tracer following Peter Shirley's 'Ray Tracing in One Weekend' This project demonstrates fundamental ray tracing concepts including realistic lighting, materials, and 3D rendering. 1

Features

Realistic Materials Lambertian (matte) surfaces with accurate light scattering Metallic materials with configurable fuzziness Dielectric (glass) materials with refraction

Advanced Camera System Adjustable field of view and focus Depth of field effects Anti-aliasing through supersampling

Physical Light Simulation Accurate ray bouncing and light transport Gamma correction for realistic color output Configurable ray depth for performance tuning

Building

Clone this repository Open the .sln file in Visual Studio Build the solution (Ctrl + Shift + B) Navigate to the Debug folder in command prompt

Running bash# Navigate to debug folder cd "path/to/project/x64/Debug"

Render an image

myfirstraytracer.exe > image.ppm

View progress in real-time

Progress updates will show in the console

Viewing Output The ray tracer outputs in PPM format. You can:

Use online PPM viewers Convert to PNG/JPG using online tools

Some more examples of things you can do with this Ray Tracer: 2 3 4 6 7 8

About

C++ Ray Tracer following Peter Shirley's 'Ray Tracing in One Weekend'

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages