Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | List of all members
PbrMicrofacetDistribution< REAL > Class Template Referenceabstract
Inheritance diagram for PbrMicrofacetDistribution< REAL >:
CoreScratchpadObject PbrAnisotropicBeckmann< REAL > PbrAnisotropicGgx< REAL > PbrBeckmann< REAL > PbrGgx< REAL > PbrSheen< REAL >

Public Member Functions

virtual REAL sample (const GMathVec3< REAL > &wi_local, REAL u, REAL v, GMathVec3< REAL > &h_local, REAL &weight) const =0
 sample Uses the provided samples in the domain [0,1] in order to generate a candidate outgoing direction. Once this vector is computed, the sample function also computes and returns the PDF of the distribution function for the candidate normal.
 
virtual REAL evaluate (const GMathVec3< REAL > &wi_local, const GMathVec3< REAL > &h_local, REAL &weight) const =0
 evaluate Compute the ndf and return the pdf of the current sample
 
virtual REAL get_roughness () const =0
 
virtual REAL lambda (const GMathVec3< REAL > &w_local, bool is_wo) const =0
 lambda function used to evaluate geometric shadowing and masking of the microfacet distribution
 
- Public Member Functions inherited from CoreScratchpadObject
virtual ~CoreScratchpadObject ()
 Implement this virtual destructor in your data class, the memory scratchpad will call it on the reset call.
 

Member Function Documentation

template<typename REAL = double>
virtual REAL PbrMicrofacetDistribution< REAL >::evaluate ( const GMathVec3< REAL > &  wi_local,
const GMathVec3< REAL > &  h_local,
REAL &  weight 
) const
pure virtual

evaluate Compute the ndf and return the pdf of the current sample

Parameters
wi_localthe incoming direction at the surface point, in local space
h_localthe sampled normal computed by the function, in local space
weightthe output ratio of the normal distribution function and the PDF
Returns
the pdf

Implemented in PbrAnisotropicBeckmann< REAL >, PbrAnisotropicGgx< REAL >, PbrBeckmann< REAL >, PbrGgx< REAL >, and PbrSheen< REAL >.

template<typename REAL = double>
virtual REAL PbrMicrofacetDistribution< REAL >::lambda ( const GMathVec3< REAL > &  w_local,
bool  is_wo 
) const
pure virtual

lambda function used to evaluate geometric shadowing and masking of the microfacet distribution

Parameters
w_localthe ray direction in local space (incoming or outgoing)
h_localthe half angle vector in local space
is_woIf true it means that w_local is the incomming direction at the surface point else it is the outgoing direction
Returns
a term used to compute the shadowing and masking function

Implemented in PbrAnisotropicBeckmann< REAL >, PbrAnisotropicGgx< REAL >, PbrBeckmann< REAL >, PbrGgx< REAL >, and PbrSheen< REAL >.

template<typename REAL = double>
virtual REAL PbrMicrofacetDistribution< REAL >::sample ( const GMathVec3< REAL > &  wi_local,
REAL  u,
REAL  v,
GMathVec3< REAL > &  h_local,
REAL &  weight 
) const
pure virtual

sample Uses the provided samples in the domain [0,1] in order to generate a candidate outgoing direction. Once this vector is computed, the sample function also computes and returns the PDF of the distribution function for the candidate normal.

Parameters
wi_localthe incoming direction at the surface point, in local space
uthe 2D sample
vthe 2D sample
h_localthe sampled normal computed by the function, in local space
weightthe output ratio of the normal distribution function and the PDF
Returns
the PDF of the distribution function for the candidate normal.

Implemented in PbrAnisotropicBeckmann< REAL >, PbrAnisotropicGgx< REAL >, PbrBeckmann< REAL >, PbrGgx< REAL >, and PbrSheen< REAL >.