alvinobarboza/raytracer-cpp — reverse-engineered prompt

Reverse engineered prompt

Build me a simple software raytracer in modern C++ that renders a small 3D scene to an image or window, mainly as a clean learning project. I want camera movement with the mouse, a nice sky background that blends from gray to blue to dark blue, and materials that support reflections and refraction with decent looking glass, even if the physics are simplified.

Please include both a single threaded version and a tile based multithreaded renderer so I can compare the results and performance. The multithreaded output should match the single threaded one visually. Keep the color math clean by working in vector colors and only converting at the end.

Make it easy to build and run, with a straightforward CMake setup and sensible defaults for the demo scene. I’d also like the code to feel readable and modern, since this is meant to help someone learn C++. If anything is unclear, check current docs online and fill in the gaps with reasonable choices.

Want more depth? Deep Reverse