Fermat
Public Types | Public Methods | Public Members | List of all members
BsdfInverse Struct Reference

Detailed description

A bsdf inverter

#include <path_inversion.h>

Public Types

enum  ComponentSelectionStrategy {
  kWeightedComponentSelection = 0, kUniformComponentSelection = 1, kPdfComponentSelection = 3, kWeightedPdfComponentSelection = 4,
  kBrdfComponentSelection = 5
}
 
enum  PdfType { kDirectTransformPdf = 0, kInverseTransformPdf = 1 }
 
enum  Order { DR = Bsdf::kDiffuseReflectionIndex, DT = Bsdf::kDiffuseTransmissionIndex, GR = Bsdf::kGlossyReflectionIndex, GT = Bsdf::kGlossyTransmissionIndex }
 

Public Methods

FERMAT_HOST_DEVICE FERMAT_FORCEINLINE void setup (ComponentSelectionStrategy _strategy, const Bsdf &bsdf, const VertexGeometry &geom, const cugar::Vector3f &in, const cugar::Vector3f &out, const bool _RR=false)
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE Bsdf::ComponentType sample_component (const float v) const
 
template<typename TRandomGenerator >
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool invert (const Bsdf &bsdf, const VertexGeometry &geom, const cugar::Vector3f &in, const cugar::Vector3f &out, TRandomGenerator &random, cugar::Vector3f &z, BsdfInverse::PdfType pdf_type=BsdfInverse::kDirectTransformPdf, float *p=NULL, float *p_proj=NULL)
 
template<typename TRandomGenerator >
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool invert_component (const Bsdf &bsdf, const VertexGeometry &geom, const cugar::Vector3f &in, const cugar::Vector3f &out, const Bsdf::ComponentType out_comp, TRandomGenerator &random, cugar::Vector3f &z, const bool output_global_coordinates=true)
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float pdf (const Bsdf::ComponentType out_comp, cugar::SphericalMeasure measure=cugar::kProjectedSolidAngle, const bool weighted=false) const
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float pdf_comp (const Bsdf::ComponentType out_comp) const
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE float weight (const Bsdf::ComponentType out_comp) const
 
FERMAT_HOST_DEVICE FERMAT_FORCEINLINE bool precompute_component_selection_coefficients ()
 

Public Members

ComponentSelectionStrategy strategy
 
float w [4]
 
float p_comp [4]
 
float p_comp_proj [4]
 
float p_sel [4]
 
cugar::Vector3f f_comp [4]
 
bool RR
 

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