Skip to content

tigrazone/GLSL-PathTracer

 
 

Repository files navigation

GLSL-PathTracer

A physically based path tracer that runs in a GLSL fragment shader.

HDRI power

RenderMan Swatch

Stormtrooper

Panther

Crown

Features

  • Unidirectional path tracer
  • RadeonRays for building BVHs (Traversal is performed in a shader)
  • Disney BSDF
  • OpenImageDenoise
  • Texture Mapping (Albedo, Metallic-Roughness, Normal)
  • Analytic Lights (Sphere, Rect, Directional) with MIS
  • IBL
  • Progressive + Tiled Rendering
  • Load Scene from ui
  • Load Environment Map from ui in hdr, exr formats
  • Save image to png, tga, bmp, jpg, exr, hdr from ui
  • Render fixed samples or fixed time and save image
  • Control many paremeters of camera from keyboard
  • Save image with samples interval or time interval periodically
  • Parallel and optimised textures load
  • Rotate environment map by X and Y
  • Print current camera params
  • Show samples and render time in window title
  • Adaptive antialiasing (-aaa nsamples - adaptive antialiasing with nsamples maximum every pass)

Build Instructions

Please see INSTALL-WIN.txt for the build instructions for Windows and INSTALL-LINUX.txt for Linux

Sample Scenes

A couple of sample scenes are provided in the repository. Additional scenes can be downloaded from here: https://drive.google.com/file/d/1UFMMoVb5uB7WIvCeHOfQ2dCQSxNMXluB/view

Gallery

Two dragons

statues

Mustang_red

Mustang

Hyperion

Ajax

Dining Room

Rank3PoliceUnit

Staircase

Substance Boy

Dragon

Controls

Key Action
W / A / S / D Move camera step forward, left, back, right
R / F Move camera up/down
Mouse left Look around
Mouse right Camera forward/back
Mouse middle Camera pan
Home / End Adjust movement speed
Z / X Adjust environment map emission
N / M Rotate environment map by X
Y / H Rotate environment map by Y
I / K / J / L Rotate camera by X, Y
Arrow keys Move camera
Page Up / Down Move camera up/down
, / . Change FOV
P Print current camera params
Tab Toggle UI visibility

Use Ctrl-Shift for 100x step, Ctrl for 1/10 step, Alt for 1/2 step, Shift for 10x step

Command line parameters

Key Action
-spp nsamples Render nsamples, save file and exit
-time nseconds Render nseconds, save file and exit
-saveEverySpp nsamples Save image every nsamples
-saveEveryTime nseconds Save image every nseconds
-addspp Add to filename of image info about samples and time for -saveEverySpp, -saveEveryTime
-noRoughSpecDefMat Set rougness=0 and specular=0 for default material. Rougness never 0, minimum 0.00025
-o filename Set output file name
-s scenename Load scene to render
--scene scenename Load scene to render
-aaa aaaPasses Set adaptive sampling passes
-testAjax Create predefined scene with 3 Ajax burstes
-testBoy Create predefined scene with 4 "boy" objects

References/Credits

Packages

No packages published

Languages

  • C++ 69.9%
  • GLSL 27.0%
  • CMake 1.9%
  • Other 1.2%