Skip to content

A minimal GPU accelerated ray tracer written in OpenGL.

Notifications You must be signed in to change notification settings

ishaanshah/raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ray Tracer

A minimal GPU accelerated ray tracer written in OpenGL.

10k Samples / 813 Seconds
10k Samples / 813 Seconds

Features:

  • Next event estimation
  • GGX microfacet model for variable roughness
  • Sampling of visible normal distribution function
  • Progressive rendering
  • BVH acceleration

Screenshots

Normals Normals Compare Samples
Left: Normals, Middle: Diffuse, Right: Quality vs Samples

Requirements

  • CMake
  • GPU with OpenGL (>= 4.6) support
  • GLFW (already included)
  • GLAD (aldreay included)
  • STB (already included)

Build

mkdir build
cd build
cmake ..
make

Usage

raytracer <NUM_SAMPLES> <IMAGE_SIZE> <IMAGE_PATH>

TODO:

  • SVGF denoising
  • Transmissive materials (glass, water etc.)
  • Allow importing OBJ files
  • Bidirectional path tracing
  • Move to Vulkan and use hardware ray tracing acceleration

Known Issues

  • There are some ringing artifacts on the left Cuboid and the Sphere (see diffuse.png).
  • Using BVH is actually slower than not using it (11s vs 8s for 100 samples).

About

A minimal GPU accelerated ray tracer written in OpenGL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published