Fermat
Public Methods | List of all members
PTVertexProcessor Struct Reference

Detailed description

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:

  • the computation of NEE weights
  • the computation of scattering weights
  • the accumulation of emissive surface hits
  • the accumulation of NEE samples

#include <pathtracer_vertex_processor.h>

Public Methods

template<typename PTContext >
FERMAT_DEVICE uint32 preprocess_vertex (const PTContext &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 PTContext >
FERMAT_DEVICE void compute_nee_weights (const PTContext &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)
 
template<typename PTContext >
FERMAT_DEVICE void compute_scattering_weights (const PTContext &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)
 [PTVertexProcessor::compute_nee_weights] More...
 
template<typename PTContext >
FERMAT_DEVICE void accumulate_emissive (const PTContext &context, RenderingContextView &renderer, const PixelInfo pixel_info, const uint32 prev_vertex_info, const uint32 vertex_info, const EyeVertex &ev, const cugar::Vector3f &w)
 [PTVertexProcessor::compute_scattering_weights] More...
 
template<typename PTContext >
FERMAT_DEVICE void accumulate_nee (const PTContext &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)
 [PTVertexProcessor::accumulate_emissive] More...
 

Member Function Documentation

◆ accumulate_emissive()

template<typename PTContext >
FERMAT_DEVICE void PTVertexProcessor::accumulate_emissive ( const PTContext &  context,
RenderingContextView renderer,
const PixelInfo  pixel_info,
const uint32  prev_vertex_info,
const uint32  vertex_info,
const EyeVertex ev,
const cugar::Vector3f w 
)
inline

[PTVertexProcessor::compute_scattering_weights]

[PTVertexProcessor::accumulate_emissive] accumulate an emissive surface hit

Parameters
contextthe current context
rendererthe current renderer
pixel_infopacked pixel info
vertex_infopacked vertex info
evthe eye vertex
wthe emissive sample weight

◆ accumulate_nee()

template<typename PTContext >
FERMAT_DEVICE void PTVertexProcessor::accumulate_nee ( const PTContext &  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 
)
inline

[PTVertexProcessor::accumulate_emissive]

[PTVertexProcessor::accumulate_nee] accumulate a NEE sample

Parameters
contextthe current context
rendererthe current renderer
pixel_infopacked pixel info
vertex_infopacked vertex info
hitthe hit information
w_dthe diffuse nee weight
w_gthe glossy nee weight

◆ compute_nee_weights()

template<typename PTContext >
FERMAT_DEVICE void PTVertexProcessor::compute_nee_weights ( const PTContext &  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 
)
inline

[PTVertexProcessor::compute_nee_weights] compute nee weights given a vertex

Parameters
contextthe current context
rendererthe current renderer
pixel_infopacked pixel info
vertex_infopacked vertex info
evthe eye vertex
f_dthe diffuse brdf
f_gthe glossy brdf
wthe current path weight
f_Lthe current light EDF sample contribution, including the MIS weight
out_w_dthe output diffuse weight
out_w_gthe output glossy weight
out_vertex_infothe output packed vertex info

[PTVertexProcessor::compute_nee_weights_body]

[PTVertexProcessor::compute_nee_weights_body]

◆ compute_scattering_weights()

template<typename PTContext >
FERMAT_DEVICE void PTVertexProcessor::compute_scattering_weights ( const PTContext &  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 
)
inline

[PTVertexProcessor::compute_nee_weights]

[PTVertexProcessor::compute_scattering_weights] compute scattering weights given a vertex

Parameters
contextthe current context
rendererthe current renderer
pixel_infopacked pixel info
vertex_infopacked vertex info
evthe local vertex
out_compthe bsdf scattering component
gthe bsdf scattering weight (= f/p)
wthe current path weight
out_wthe output path weight
out_vertex_infothe output vertex info

◆ preprocess_vertex()

template<typename PTContext >
FERMAT_DEVICE uint32 PTVertexProcessor::preprocess_vertex ( const PTContext &  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 
)
inline

preprocess a vertex and return some packed vertex info

Parameters
contextthe current context
rendererthe current renderer
pixel_infopacked pixel info
evthe eye vertex
cone_radiusthe current cone radius
scene_bboxthe scene bounding box

The documentation for this struct was generated from the following file: