Rendu
A lightweight rendering engine for experimentations
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
PathTracerApp Class Referencefinal

Viewer coupled with a basic diffuse path tracer. The user can move the camera anywhere and trigger a path-traced rendering. Can also display the raycaster acceleration structure. More...

#include <PathTracerApp.hpp>

Public Member Functions

 PathTracerApp (RenderingConfig &config, Window &window, const std::shared_ptr< Scene > &scene)
 
void draw () override
 
void update () override
 
void physics (double fullTime, double frameTime) override
 
void resize () override
 
- Public Member Functions inherited from CameraApp
 CameraApp (RenderingConfig &config, Window &window)
 
virtual void update () override
 
virtual void physics (double fullTime, double frameTime)
 
- Public Member Functions inherited from Application
 Application (RenderingConfig &config, Window &window)
 
virtual void draw ()=0
 
virtual void update ()
 
virtual void finish ()
 
virtual void resize ()=0
 
double timeElapsed ()
 
double frameTime ()
 
double frameRate ()
 
Windowwindow ()
 
virtual ~Application ()
 
 Application (const Application &)=delete
 
Applicationoperator= (const Application &)=delete
 
 Application (Application &&)=delete
 
Applicationoperator= (Application &&)=delete
 

Private Attributes

Program_passthrough
 Passthrough program.
 
Texture _renderTex
 The result texture and image.
 
std::shared_ptr< Scene_scene
 The scene to render.
 
std::unique_ptr< PathTracer_pathTracer
 The scene specific path tracer.
 
std::unique_ptr< BVHRenderer_bvhRenderer
 The scene debug viewer.
 
Texture _sceneColor
 Scene color texture.
 
Texture _sceneDepth
 Scene depth texture.
 
int _samples = 8
 Samples count.
 
int _depth = 5
 Depth of each ray.
 
float _exposure = 1.f
 Exposure of the displayed result.
 
bool _showRender = false
 Should the result be displayed.
 
bool _lockLevel = true
 Lock the range of the BVH visualisation.
 
bool _liveRender = false
 Display the result in real-time.
 

Additional Inherited Members

- Protected Member Functions inherited from CameraApp
void freezeCamera (bool shouldFreeze)
 
- Protected Attributes inherited from CameraApp
ControllableCamera _userCamera
 The interactive camera.
 
- Protected Attributes inherited from Application
RenderingConfig_config
 The current configuration.
 
std::unique_ptr< DebugViewer_debug
 Debug viewer.
 

Detailed Description

Viewer coupled with a basic diffuse path tracer. The user can move the camera anywhere and trigger a path-traced rendering. Can also display the raycaster acceleration structure.

Inherits CameraApp.

Constructor & Destructor Documentation

◆ PathTracerApp()

PathTracerApp::PathTracerApp ( RenderingConfig config,
Window window,
const std::shared_ptr< Scene > &  scene 
)
explicit

Constructor.

Parameters
configthe configuration to apply
windowthe window to render to
scenethe scene to render

Member Function Documentation

◆ draw()

void PathTracerApp::draw ( )
overridevirtual

Draw call.

Implements Application.

◆ physics()

void PathTracerApp::physics ( double  fullTime,
double  frameTime 
)
overridevirtual

Perform physics simulation update.

Parameters
fullTimethe time elapsed since the beginning of the render loop
frameTimethe duration of the last frame
Note
This function can be called multiple times per frame.

Reimplemented from CameraApp.

◆ resize()

void PathTracerApp::resize ( )
overridevirtual

Handle a window resize event, the configuration has been updated with the new size.

Implements Application.

◆ update()

void PathTracerApp::update ( )
overridevirtual

Per-frame update.

Reimplemented from CameraApp.


The documentation for this class was generated from the following files: