Rendu
A lightweight rendering engine for experimentations
|
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 () |
Window & | window () |
virtual | ~Application () |
Application (const Application &)=delete | |
Application & | operator= (const Application &)=delete |
Application (Application &&)=delete | |
Application & | operator= (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. | |
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.
|
explicit |
Constructor.
config | the configuration to apply |
window | the window to render to |
scene | the scene to render |
|
overridevirtual |
Draw call.
Implements Application.
|
overridevirtual |
Perform physics simulation update.
fullTime | the time elapsed since the beginning of the render loop |
frameTime | the duration of the last frame |
Reimplemented from CameraApp.
|
overridevirtual |
Handle a window resize event, the configuration has been updated with the new size.
Implements Application.
|
overridevirtual |
Per-frame update.
Reimplemented from CameraApp.