Giter Site home page Giter Site logo

glsl-pathtracer's Introduction

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 :)

glsl-pathtracer's People

Contributors

knightcrawler25 avatar cedricguillemet avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.