10 #ifndef SLPATHTRACER_H
11 #define SLPATHTRACER_H
float SLfloat
analog to GLfloat
#define SL_LOG(...)
Some debugging and error handling macros.
unsigned int SLuint
analog to GLuint
bool SLbool
analog to GLbool
typedef void(SL_STDCALL *cbOnImGuiBuild)(SLScene *s
Callback function typedef for ImGui build function.
Classic Monte Carlo Pathtracing algorithm for real global illumination.
SLbool _calcIndirect
flag to calculate indirect illumination
SLCol4f shade(SLRay *ray, SLCol4f *mat)
SLbool render(SLSceneView *sv)
SLfloat noiseRSE() const
Mean relative standard error of the pixels of the last render.
void calcDirect(SLbool di)
SLbool calcIndirect() const
vector< SLdouble > _lumSumSq
SLbool _calcDirect
flag to calculate direct illumination
vector< SLCol4f > _radianceSum
Linear, unclamped sum of all radiance samples taken so far per pixel.
void sampleClamp(SLfloat max)
SLfloat _noiseRSE
mean relative standard error, see noiseRSE()
void renderSlices(bool isMainThread, SLint currentSample, SLuint threadNum)
void calcIndirect(SLbool ii)
SLfloat sampleClamp() const
SLfloat efficiency() const
Monte Carlo efficiency, the inverse of variance times time.
void saveImage()
Saves the current PT image as PNG image.
SLbool calcDirect() const
SLfloat _sampleClamp
Upper limit on the radiance of a single sample, 0 to switch it off.
function< void(bool, int, SLuint)> renderSlicesPTAsync
SLfloat _noiseRSE999
the same for the worst 0.1%, see noiseRSE999()
SLCol4f trace(SLRay *ray, SLfloat bsdfPdf)
Traces one ray. bsdfPdf is the solid angle density with which the.
SLfloat noiseRSE999() const
Relative standard error of the noisiest 0.1% of the pixels.
vector< SLdouble > _lumSum
Sum and sum of squares of the luminance of every sample, per pixel.
Ray class with ray and intersection properties.
SLRaytracer hold all the methods for Whitted style Ray Tracing.
SLfloat _renderSec
Rendering time in seconds.
SceneView class represents a dynamic real time 3D view onto the scene.