$ cd ~/projects Raytracer A CPU rendering exercise with a Windows desktop viewer ──────────────────────────────────────────────────── A multithreaded raytracer running on the CPU implemented in C# as a personal exercise. tags: C#, Game Development ──────────────────────────────────────────────────── ## Render a scene of spheres This personal C# exercise traces rays through a scene of spheres and scatters them using diffuse Lambert materials. It performs the rendering on the CPU and distributes image rows across worker threads. A background worker reports progress to the desktop window. The code keeps the camera, scene objects, materials, intersection results, and image buffer separate, making the rendering pipeline available to inspect and modify. Raytracer on GitHub https://github.com/michidk/Raytracer ──────────────────────────────────────────────────── ## Explore the example scene Open Raytracer.sln in a Windows development environment that supports the project's WPF application and .NET Framework 4.6.1 target. The window starts rendering the built-in example scene when it opens. WASD moves the camera and starts a new render. Scene construction lives in SceneGraph/Scene.cs. Sampling, trace depth, and threading options are constants in RenderEngine.cs, so experimenting with rendering settings means editing the source. Raytracer source and example output https://github.com/michidk/Raytracer/blob/master/README.md ──────────────────────────────────────────────────── $ ls ~/pages > about curl -L lohr.dev > projects curl -L lohr.dev/projects > blog curl -L lohr.dev/blog > stats curl -L lohr.dev/stats > contact curl -L lohr.dev/contact ──────────────────────────────────────────────────── https://lohr.dev