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

Detailed description

A utility class to encapsulate all important information for a light subpath vertex

#include <bpt_utils.h>

Public Methods

FERMAT_HOST_DEVICE void setup (const cugar::Vector4f &_pos, const uint2 &_packed_info1, const uint4 &_packed_info2, const PathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE void setup (const Ray &ray, const Hit &hit, const cugar::Vector3f &_alpha, const PathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE void setup (const Ray &ray, const Hit &hit, const cugar::Vector3f &_alpha, const TempPathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE void setup (const cugar::Vector3f &_in, const VertexGeometryId &_v, const cugar::Vector3f &_alpha, const PathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE void setup (const cugar::Vector3f &_in, const VertexGeometryId &_v, const cugar::Vector3f &_alpha, const TempPathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE LightVertex (const cugar::Vector4f &_pos, const uint2 &_packed_info1, const uint4 &_packed_info2, const PathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE LightVertex (const Ray &_ray, const Hit &_hit, const cugar::Vector3f &_alpha, const TempPathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE LightVertex (const cugar::Vector3f &_in, const VertexGeometryId &_v, const cugar::Vector3f &_alpha, const TempPathWeights &_weights, const uint32 _depth, const RenderingContextView &renderer)
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool sample (const float z[3], Bsdf::ComponentType &out_comp, cugar::Vector3f &out, float &out_p, float &out_p_proj, cugar::Vector3f &out_g, bool RR=true, bool evaluate_full_bsdf=false, const Bsdf::ComponentType components=Bsdf::kAllComponents) const
 

Public Members

VertexGeometryId geom_id
 
VertexGeometry geom
 
cugar::Vector3f in
 
cugar::Vector3f alpha
 
PathWeights weights
 
uint32 depth
 
MeshMaterial material
 
Edf edf
 
Bsdf bsdf
 
float prev_G_prime
 
float prev_pG
 
float pGp_sum
 

Member Function Documentation

◆ sample()

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool LightVertex::sample ( const float  z[3],
Bsdf::ComponentType out_comp,
cugar::Vector3f out,
float &  out_p,
float &  out_p_proj,
cugar::Vector3f out_g,
bool  RR = true,
bool  evaluate_full_bsdf = false,
const Bsdf::ComponentType  components = Bsdf::kAllComponents 
) const
inline

sample an outgoing direction

Parameters
zthe incoming direction
out_compthe output component
outthe outgoing direction
out_pthe output solid angle pdf
out_p_projthe output projected solid angle pdf
out_gthe output sample value = f/p_proj
RRindicate whether to use Russian-Roulette or not
evaluate_full_bsdfndicate whether to evaluate the full BSDF, or just an unbiased estimate
componentsthe components to consider

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