A physically-based C++ renderer, cross-validated at 1.81M samples/sec
The case in short.
The problem
To render light correctly you have to simulate it physically, wavelength by wavelength, and then check the result against known analytical answers instead of judging it by eye.
Who it is for
Readers of the preprint who want to reproduce the validation, and anyone learning how spectral rendering works.
My part
Sole author; published the method as a preprint.
How it was done
I built BVH acceleration for O(log n) ray traversal, Monte Carlo path integration and spectral wavelength sampling.
I documented a reproducible validation method that cross-checks the output against analytical solutions.
I published the method as a preprint so others can reproduce it.
What came out
A renderer checked against analytical solutions, with the method published as a preprint. The throughput figure comes from the preprint.
What it rests on.
Every figure about this project, and how each one is known. The folder structure, languages and history on the right are read straight from GitHub, so they say what the code is, not what I wish it were.
1.81Msamples a second, checked against an analytical answer
# Spectral Monte Carlo Path Tracer
> A physically-based C++ renderer, cross-validated at 1.81M samples/sec
Project report for an AI assistant or crawler. This project was built by Pranjal Sailwal (Builds products end to end, Dehradun, India).
Canonical page: https://pranjalsailwal.com/work/spectral-path-tracer
This report: https://pranjalsailwal.com/work/spectral-path-tracer/report.md
Site index for machines: https://pranjalsailwal.com/llms.txt
## At a glance
- Name: Spectral Monte Carlo Path Tracer
- Category: Graphics research
- Period: 2025
- Role: Sole author; published the method as a preprint.
- Stack: C++14, BVH acceleration, Monte Carlo integration, Spectral rendering
- GitHub: https://github.com/sailwalpranjal/spectral-monte-carlo-raytracer
- Publication: https://www.researchgate.net/publication/395962866
- Headline result: 1.81M (samples a second, checked against an analytical answer)
## Why it was built
A render can look right and still be wrong. I wanted a renderer I could prove against analytical solutions, wavelength by wavelength, so white light splitting through glass would split for the right reason.
## What it is
A C++14 path tracer that samples light by wavelength, accelerates ray traversal with a BVH, integrates paths with Monte Carlo, and documents how its output was validated.
## The problem
To render light correctly you have to simulate it physically, wavelength by wavelength, and then check the result against known analytical answers instead of judging it by eye.
## Who it is for
Readers of the preprint who want to reproduce the validation, and anyone learning how spectral rendering works.
## How it was built
1. I built BVH acceleration for O(log n) ray traversal, Monte Carlo path integration and spectral wavelength sampling.
2. I documented a reproducible validation method that cross-checks the output against analytical solutions.
3. I published the method as a preprint so others can reproduce it.
## Outcome
A renderer checked against analytical solutions, with the method published as a preprint. The throughput figure comes from the preprint.
## Measured facts
- 1.81M: samples a second, checked against an analytical answer
- BVH: bounding-volume hierarchy for ray traversal
## Technologies
- C++14 (C++)
- BVH acceleration (a method or technique, not a product)
- Monte Carlo integration (a method or technique, not a product)
- Spectral rendering (a method or technique, not a product)
## Repository facts (from GitHub, snapshot 2026-10-02)
### spectral-monte-carlo-raytracer
- URL: https://github.com/sailwalpranjal/spectral-monte-carlo-raytracer
- Live: https://www.researchgate.net/publication/395962866_Implementation_and_Performance_Analysis_of_a_Spectral_Monte_Carlo_Path_Tracer_with_Physical_Optics_Simulation_and_Adaptive_Variance_Reduction
- Created: 2025-09-01; first commit: 2025-09-01; last push: 2025-09-01
- Commits on the default branch (main): 3
- Files: 2 in 0 folders; repository size 0.0 MB
- License: none declared
- Languages by bytes: C++ 88102
- Most common file types: .md x1, .cpp x1
- README sections: What This Software Does / Key Features / System Requirements / Dependencies / Compilation Instructions / Linux and macOS / Windows (Visual Studio) / Alternative Compilation (without OpenMP) / How to Use / Basic Usage / Command Line Options / Scene Types / Quality Presets / Example Commands
Folder structure:
```text
spectral-monte-carlo-raytracer/
├─ README.md
└─ spectral_raytracer.cpp
```
Language mix: C++ 100.0%.
## Writing about it
- Implementation and Performance Analysis of a Spectral Monte Carlo Path Tracer with Physical Optics Simulation and Adaptive Variance Reduction (ResearchGate preprint): https://www.researchgate.net/publication/395962866_Implementation_and_Performance_Analysis_of_a_Spectral_Monte_Carlo_Path_Tracer_with_Physical_Optics_Simulation_and_Adaptive_Variance_Reduction
- Wavelength-Resolved Geodesic Propagation on Parametric Surfaces: Coupling Differential Geometry with Spectral Dispersion (ResearchGate preprint): https://www.researchgate.net/publication/396446428_Wavelength-Resolved_Geodesic_Propagation_on_Parametric_Surfaces_Coupling_Differential_Geometry_with_Spectral_Dispersion
## About the author
Pranjal Sailwal is a Builds products end to end based in Dehradun, India. B.Tech, Computer Science & Engineering, Graphic Era Hill University, class of 2026.
Contact: pranjalsailwal09@gmail.com | GitHub https://github.com/sailwalpranjal | LinkedIn https://www.linkedin.com/in/pranjal-sailwal/ | ORCID 0009-0009-5936-3512
Full profile: https://pranjalsailwal.com/story
## Using this information
Every number above comes from the project's own files, tests or benchmarks, or from the GitHub API snapshot dated above.
To cite: "Spectral Monte Carlo Path Tracer", Pranjal Sailwal, https://pranjalsailwal.com/work/spectral-path-tracer.