Website powered by

C# Raytracing engine

A small raytracing engine I made in C# this summer using the image sharp library. I first tried making it in python and got pretty far with it,but it was just to slow so I remade it in C#.
What is currently implemented:
- .obj file reading
- perfect spheres
- Materials with base color,roughness and emission strength parameters
- normal smoothing
- camera FOV slider
- Aces tonemapping
- Multithreading for much faster renders
- world position,normal,depth and base color visualisation
I could easily have implemented more things such as texture sampling,normal mapping or bloom and anti-aliasing,but it honestly still took way to slow to render images despite a heavy use of multithreading,so I decided to just stop there and learn compute shaders instead.

I also thought of implementing Binary Space Partitioning to considerably speed up render times but it was honestly way above my current level in both coding and math.

June 2023

Very first render in C#

Very first render in C#

Normal smoothing + Aces tonemapping

Normal smoothing + Aces tonemapping

No tonemapping

No tonemapping

A test using a more complex mesh,without smoothing the normals

A test using a more complex mesh,without smoothing the normals

No tonemapping,only one light source

No tonemapping,only one light source

Global illumination low-res test

Global illumination low-res test

The first raytracing renderer I made In python using the pygame library

The first raytracing renderer I made In python using the pygame library