Skip to content

bean-mhm/ptfb

Repository files navigation

Path Tracing Final Boss (Discontinued)

The Path Tracing Final Boss (PTFB) is a work-in-progress group project, a path-tracing shader in GLSL for Shadertoy that incorporates some of the modern optimization techniques such as multiple importance sampling, screen-space temporal accumulation with reprojection, denoising, and detail-preserving upscaling. PTFB supports volumetrics, FPS-like camera controls, several primitive shapes, and a film emulation color transform (flim).

The goal is to achieve near-real-time performance and provide code for practical use cases like video game development.

Shadertoy: https://www.shadertoy.com/view/wflfW4

Participants

Setup

The code is built around the Shader Toy extension for VS Code as it provides a lot of useful features to work with shaders. You're free to use any other IDE, but using VS Code with said extension will be more convenient for this specific project.

Coding Style

  1. PascalCase for structs
  2. snake_case for variables/functions
  3. UPPER_SNAKE_CASE for constants
  4. 4 spaces for indentation
  5. Lowercase comments

The Plan

  • Make a naive path tracer that renders at half resolution in Buffer D, while Image scales it up to native resolution with bilinear interpolation. Have a constant to set the render resolution factor. Said path tracer uses ray intersection as opposed to ray marching and has support for at least spheres and triangles.

  • Add flim and basic color grading in Image.

  • Implement data management functionality in Buffer A to store camera information, resolution and mouse input, and potentially more.

  • Add camera controls based on mouse and keyboard input.

  • Implement multiple importance sampling.

  • Implement better BSDFs and richer materials.

  • Add more scenes.

  • Implement bidirectional path tracing.

  • Add basic volume scattering and absorption.

  • Implement spatiotemporal reservoir resampling.

  • Decide on and implement a denoising algorithm.

  • For sub-native resolutions, replace bilinear filtering with a more appropriate technique.

  • Polish and publish.

About

Path Tracing Final Boss

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages