Skip to content

tails1234/GLSL-PathTracer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GLSL-PathTracer

Rank3PoliceUnit Rank 3 Police Unit Scene by Nika Zautashvili. Make sure you check out his ArtStation page (https://nikvili.artstation.com/) since this render doesn't do justice to the original. He has put up this amazing blender scene for free and it was immensely useful for me in evaluating this renderer :) The one used here is a slightly simplified version from SketchFab since I barely had any GPU memory left on my poor GTX 750ti. Render is color corrected

Ajax

Dragon

Dining Room

A physically based Path Tracer that runs in a GLSL Fragment shader.

Features

  • Unidirectional PathTracer
  • Nvidia's SBVH (BVH with Spatial Splits)
  • UE4 Material Model
  • Texture Mapping (Albedo, Metallic, Roughness, Normal maps). All Texture maps are packed into 3D textures
  • Spherical and Rectangular Area Lights
  • IBL with importance sampling
  • Progressive Renderer
  • Tiled Renderer (Reduces GPU usage and timeout when depth/scene complexity is high)

Build Instructions

Open the visual studio solution (I'm using VS Community 2017) and set the configuration to 'Release' and x64 and rebuild the solution. The configuration of the renderer/sample counts/depth is moved to the scene file. The scene files are in the assets folder

TODO

  • Actually use the normal maps (Right now they are just loaded and sent to the GPU but not used)
  • Move renderer configuration to scene file
  • IBL
  • Emissive geometry
  • IBL importance sampling
  • Two-level BVH for instances and transforms
  • Support to render out animation sequences
  • Displacement mapping
  • Emissive mesh sampling
  • Sun Sky Model
  • Nested dielectrics
  • Fix issues with normal map (Microfacet-based normal mapping?)

Additional Screenshots

Staircase

Substance Boy

City

Substance Boy Glass

References/Credits

The following links/projects/books were really useful to me

There's only so much that can be done in a fragment shader before you end up with convoluted code or no performance gains. Will probably have to start with the bible 'PBRT' eventually and end up learning CUDA later. But for now this is a fun learning experience to see what can be done in a single shader :)

About

A GLSL Path Tracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 79.5%
  • GLSL 20.5%