Skip to content

Ray tracer capable of rendering a variety of materials and phenomena, such as volumetric smoke, procedural noise, and gravitational lensing.

Notifications You must be signed in to change notification settings

BakerSmithA/ray_tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer

Ray tracer written using C++ with SDL.

Build options

In order to compile and run the ray tracer

  • Compile with GNU C++ compiler which supports C++17.
  • OpenMP must be installed in the default path.
  • To run type make run

Some Features

Volumetric Rendering

Performs ray marching to simulate volumes. The image below shows the result of stacking the sprites in a 2d sprite sheet. The sprites are interpolated between to calculate the density of the volume at a 3d position.

Texture Mapping

Textures can be projected into primitives using either planar or spherical mapping. The image below shows a Jupiter texture spherically projected onto a sphere primitive.

Procedural Noise

Noise can also be generated procedurally in either 2D or 3D.

Primtives

The ray tracer supports ray intersections with triangles, spheres, or rings. Spheres and rings are demonstrated in the image below.

Gravitational Lensing

Bending of light due to gravity can be simulated using a gravitational lens shader.

About

Ray tracer capable of rendering a variety of materials and phenomena, such as volumetric smoke, procedural noise, and gravitational lensing.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages