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
PbrGgx< REAL > Class Template Reference
Inheritance diagram for PbrGgx< REAL >:
PbrMicrofacetDistribution< REAL > CoreScratchpadObject

Public Member Functions

void configure (REAL roughness)
 
virtual REAL get_roughness () const final
 
virtual REAL sample (const GMathVec3< REAL > &wi_local, REAL u, REAL v, GMathVec3< REAL > &h_local, REAL &weight) const final
 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 final
 evaluate Compute the ndf and return the pdf of the current sample
 
virtual REAL lambda (const GMathVec3< REAL > &w_local, bool is_wo) const final
 lambda function used to evaluate geometric shadowing and masking of the microfacet distribution
 

Detailed Description

template<typename REAL = double>
class PbrGgx< REAL >

class GGX This implementation of a microfacet model is based on the anisotropic GGX derivation found in the Disney Physical Shading paper (Burley), found in appendix B.

Member Function Documentation

template<typename REAL >
REAL PbrGgx< REAL >::evaluate ( const GMathVec3< REAL > &  wi_local,
const GMathVec3< REAL > &  h_local,
REAL &  weight 
) const
finalvirtual

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

Implements PbrMicrofacetDistribution< REAL >.

template<typename REAL >
REAL PbrGgx< REAL >::lambda ( const GMathVec3< REAL > &  w_local,
bool  is_wo 
) const
finalvirtual

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

Implements PbrMicrofacetDistribution< REAL >.

template<typename REAL >
REAL PbrGgx< REAL >::sample ( const GMathVec3< REAL > &  wi_local,
REAL  u,
REAL  v,
GMathVec3< REAL > &  h_local,
REAL &  weight 
) const
finalvirtual

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.

Implements PbrMicrofacetDistribution< REAL >.