Fermat
Public Methods | Public Members | List of all members
BPTConfigBase Struct Reference

Detailed description

This class implements a "policy" template for bidirectional path tracing: all bidirectional path tracing kernels are templated over a TBPTConfig class that must implement this interface. In order to change the policy, it is sufficient to inherit from this class and override the methods. Note that the methods are not virtual, but the code is written so as to use the implementation of the last class that overrides them, mantaining the inlining efficiency.

#include <bpt_kernels.h>

Public Methods

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE BPTConfigBase (const BPTOptionsBase &_options, VertexSampling _light_sampling=VertexSampling::kAll, VertexOrdering _light_ordering=VertexOrdering::kRandomOrdering, VertexSampling _eye_sampling=VertexSampling::kAll, bool _use_rr=true)
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE BPTConfigBase (uint32 _max_path_length=6, VertexSampling _light_sampling=VertexSampling::kAll, VertexOrdering _light_ordering=VertexOrdering::kRandomOrdering, VertexSampling _eye_sampling=VertexSampling::kAll, bool _use_vpls=true, bool _use_rr=true, float _light_tracing=0.0f, bool _direct_lighting_nee=true, bool _direct_lighting_bsdf=true, bool _indirect_lighting_nee=true, bool _indirect_lighting_bsdf=true, bool _visible_lights=true)
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE BPTConfigBase (const BPTConfigBase &other)
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool terminate_light_subpath (const uint32 path_id, const uint32 s) const
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool terminate_eye_subpath (const uint32 path_id, const uint32 t) const
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool store_light_vertex (const uint32 path_id, const uint32 s, const bool absorbed) const
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool perform_connection (const uint32 eye_path_id, const uint32 t, const bool absorbed) const
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool accumulate_emissive (const uint32 eye_path_id, const uint32 t, const bool absorbed) const
 
template<typename TBPTContext >
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE void visit_light_vertex (const uint32 light_path_id, const uint32 depth, const VertexGeometryId v_id, TBPTContext &context, RenderingContextView &renderer) const
 
template<typename TBPTContext >
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE void visit_eye_vertex (const uint32 eye_path_id, const uint32 depth, const VertexGeometryId v_id, const EyeVertex &v, TBPTContext &context, RenderingContextView &renderer) const
 

Public Members

uint32 max_path_length: 10
 
uint32 light_sampling: 1
 
uint32 light_ordering: 1
 
uint32 eye_sampling: 1
 
uint32 use_vpls: 1
 
uint32 use_rr: 1
 
uint32 direct_lighting_nee: 1
 
uint32 direct_lighting_bsdf: 1
 
uint32 indirect_lighting_nee: 1
 
uint32 indirect_lighting_bsdf: 1
 
uint32 visible_lights: 1
 
float light_tracing
 

Member Function Documentation

◆ accumulate_emissive()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool BPTConfigBase::accumulate_emissive ( const uint32  eye_path_id,
const uint32  t,
const bool  absorbed 
) const
inline

decide whether to accumulate an emissive sample from a pure (eye) path tracing estimator

Parameters
eye_path_idindex of the eye subpath
tvertex number along the eye subpath
absorbedtrue if the eye subpath has been absorbed/terminated here

◆ perform_connection()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool BPTConfigBase::perform_connection ( const uint32  eye_path_id,
const uint32  t,
const bool  absorbed 
) const
inline

decide whether to perform a bidirectional connection

Parameters
eye_path_idindex of the eye subpath
tvertex number along the eye subpath
absorbedtrue if the eye subpath has been absorbed/terminated here

◆ store_light_vertex()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool BPTConfigBase::store_light_vertex ( const uint32  path_id,
const uint32  s,
const bool  absorbed 
) const
inline

decide whether to store a given light vertex

Parameters
path_idindex of the light subpath
svertex number along the light subpath

◆ terminate_eye_subpath()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool BPTConfigBase::terminate_eye_subpath ( const uint32  path_id,
const uint32  t 
) const
inline

decide whether to terminate a given eye subpath

Parameters
path_idindex of the eye subpath
svertex number along the eye subpath

◆ terminate_light_subpath()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool BPTConfigBase::terminate_light_subpath ( const uint32  path_id,
const uint32  s 
) const
inline

decide whether to terminate a given light subpath

Parameters
path_idindex of the light subpath
svertex number along the light subpath

◆ visit_eye_vertex()

template<typename TBPTContext >
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE void BPTConfigBase::visit_eye_vertex ( const uint32  eye_path_id,
const uint32  depth,
const VertexGeometryId  v_id,
const EyeVertex v,
TBPTContext &  context,
RenderingContextView renderer 
) const
inline

allow to process/store the given eye vertex

◆ visit_light_vertex()

template<typename TBPTContext >
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE void BPTConfigBase::visit_light_vertex ( const uint32  light_path_id,
const uint32  depth,
const VertexGeometryId  v_id,
TBPTContext &  context,
RenderingContextView renderer 
) const
inline

allow to process/store the given light vertex


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