Skip to content

MuellerMarvin/RayTracer-in-CSharp

Repository files navigation

RayTracer-in-CSharp

metal.mp4

An implementation of a simple Raytracer in C#, loosely following the guidance of http://raytracing.github.io.

Want to try it out ?

There is a simple demo that can be found in the releases section: https://github.com/MuellerMarvin/RayTracer-in-CSharp/releases/tag/0.0.1

What can it currently do ?

It can render simple spheres, as well as 3D-Meshes (but with currently poor performance) with a number of different materials. New materials can also be created in-code using the IMaterial interface.

How to compile ?

The repo consists of a VS2019 Solution that runs best with .NET 5 installed. Just open it and given you have selected .NET 5 in the installer it should compile by itself.

Which materials are there ?

Lambertian Reflective

A standard diffuse material.

spheres

(All spheres have this material with the color gray as albedo)

Metal

Metal with an adjustable level of roughness.

metal.mp4

(The middle sphere is metal, the others Lambertian Diffusive)

Dielectric

Dielectric material for transparent materials (like glass) - supporting custom index of refraction. The standard glass material has a refractive index of 1.5.

image_0

(Left Glass bubble, middle glass sphere, right lambertian sphere, ground lambertian sphere)

Normal Reflective

An unrealistic material that reflects every ray towards the surface-normal. This results in a material where every point has the color of what it would 'see' from that perspective.

normalreflective

(Only the left sphere has the material, the others are Lambertian Diffusive)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages