Fermat
|
A simple implementation of the TPTVertexProcessor policy interface required by all the PTLibCore functions. This class is responsible of processing each vertex generated by the path tracer, including:
#include <psfpt_vertex_processor.h>
Classes | |
union | CacheInfo |
[PSFPTVertexProcessor::CacheInfo] More... | |
Public Methods | |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE | PSFPTVertexProcessor (float _firefly_filter=1000.0f) |
[PSFPTVertexProcessor::CacheInfo] | |
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE cugar::Vector3f | clamp_sample (const cugar::Vector3f v) |
template<typename TPTContext > | |
FERMAT_DEVICE uint32 | preprocess_vertex (TPTContext &context, const RenderingContextView &renderer, const PixelInfo pixel_info, const EyeVertex &ev, const float cone_radius, const cugar::Bbox3f scene_bbox, const uint32 prev_vertex_info, const cugar::Vector3f w, const float p_prev) |
template<typename TPTContext > | |
FERMAT_DEVICE void | compute_nee_weights (const TPTContext &context, const RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 prev_vertex_info, const uint32 vertex_info, const EyeVertex &ev, const cugar::Vector3f &f_d, const cugar::Vector3f &f_g, const cugar::Vector3f &w, const cugar::Vector3f &f_L, cugar::Vector3f &out_w_d, cugar::Vector3f &out_w_g, uint32 &out_vertex_info) |
[PSFPTVertexProcessor::preprocess_vertex] More... | |
template<typename TPTContext > | |
FERMAT_DEVICE void | compute_scattering_weights (const TPTContext &context, const RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 prev_vertex_info, const uint32 vertex_info, const EyeVertex &ev, const uint32 out_comp, const cugar::Vector3f &g, const cugar::Vector3f &w, cugar::Vector3f &out_w, uint32 &out_vertex_info) |
[PSFPTVertexProcessor::compute_nee_weights] More... | |
template<typename TPTContext > | |
FERMAT_DEVICE void | accumulate_emissive (const TPTContext &context, RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 prev_vertex_info, const uint32 vertex_info, const EyeVertex &ev, const cugar::Vector3f &out_w) |
[PSFPTVertexProcessor::compute_scattering_weights] More... | |
template<typename TPTContext > | |
FERMAT_DEVICE void | accumulate_nee (const TPTContext &context, RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 vertex_info, const bool shadow_hit, const cugar::Vector3f &w_d, const cugar::Vector3f &w_g) |
[PSFPTVertexProcessor::accumulate_emissive] More... | |
Public Members | |
float | firefly_filter |
[PSFPTVertexProcessor::accumulate_nee] | |
Static Public Members | |
static const uint32 | DIFFUSE_COMP = 0x1u |
static const uint32 | GLOSSY_COMP = 0x2u |
static const uint32 | ALL_COMPS = 0x3u |
|
inline |
[PSFPTVertexProcessor::compute_scattering_weights]
[PSFPTVertexProcessor::accumulate_emissive] accumulate an emissive surface hit
context | the current context |
renderer | the current renderer |
pixel_info | packed pixel info |
vertex_info | packed vertex info |
ev | the eye vertex |
w | the emissive sample weight |
|
inline |
[PSFPTVertexProcessor::accumulate_emissive]
[PSFPTVertexProcessor::accumulate_nee] accumulate a NEE sample
context | the current context |
renderer | the current renderer |
pixel_info | packed pixel info |
vertex_info | packed vertex info |
hit | the hit information |
w_d | the diffuse nee weight |
w_g | the glossy nee weight |
[PSFPTVertexProcessor::accumulate_to_cache]
[PSFPTVertexProcessor::accumulate_to_cache]
[PSFPTVertexProcessor::accumulate_remainder_to_framebuffer]
[PSFPTVertexProcessor::accumulate_remainder_to_framebuffer]
[PSFPTVertexProcessor::accumulate_all_to_framebuffer]
[PSFPTVertexProcessor::accumulate_all_to_framebuffer]
|
inline |
[PSFPTVertexProcessor::preprocess_vertex]
[PSFPTVertexProcessor::compute_nee_weights] compute nee weights given a vertex
context | the current context |
renderer | the current renderer |
pixel_info | packed pixel info |
vertex_info | packed vertex info |
ev | the eye vertex |
f_d | the diffuse brdf |
f_g | the glossy brdf |
w | the current path weight |
f_L | the current sample contribution, including the MIS weight |
out_w_d | the output diffuse weight |
out_w_g | the output glossy weight |
out_vertex_info | the output packed vertex info |
|
inline |
[PSFPTVertexProcessor::compute_nee_weights]
[PSFPTVertexProcessor::compute_scattering_weights] compute scattering weights given a vertex
context | the current context |
renderer | the current renderer |
pixel_info | packed pixel info |
vertex_info | packed vertex info |
ev | the eye vertex |
out_comp | the brdf scattering component |
g | the brdf scattering weight (= f/p) |
w | the current path weight |
out_w | the output weight |
out_vertex_info | the output vertex info |
|
inline |
[PSFPTVertexProcessor::preprocess_vertex] preprocess a vertex and return some packed vertex info
context | the current context |
renderer | the current renderer |
pixel_info | packed pixel info |
ev | the eye vertex |
cone_radius | the current cone radius |
scene_bbox | the scene bounding box |
[PSFPTVertexProcessor::compute_jittering_coordinates]
[PSFPTVertexProcessor::compute_jittering_coordinates]
[PSFPTVertexProcessor::compute_spatial_hash]
[PSFPTVertexProcessor::compute_spatial_hash]
[PSFPTVertexProcessor::insert_into_hashmap]
[PSFPTVertexProcessor::insert_into_hashmap]
[PSFPTVertexProcessor::append_refs]
[PSFPTVertexProcessor::append_refs]
[PSFPTVertexProcessor::finalize]
[PSFPTVertexProcessor::finalize]