Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | Private Types | Private Member Functions | List of all members
sgd< CONF, NAME > Class Template Reference

The SGD microfacet distribution with fitted shadowing and masking. More...

#include <sgd.h>

Inherits sgd_base< CONF, NAME >.

Public Member Functions

 BBM_IMPORT_CONFIG (CONF)
 
Spectrum eval (const Vec3d &halfway, Mask mask=true) const
 Evaluate the NDF.
 
Spectrum G1 (const Vec3d &v, const Vec3d &m, Mask mask=true) const
 Monodirectional shadowing and masking term.
 
 BBM_DEFAULT_CONSTRUCTOR (sgd)
 Default Constructor.
 
From base
Vec3d sample (const Vec3d &view, const Vec2d &xi, Mask mask=true) const
 Sample the NDF.
 
Value pdf (const Vec3d &view, const Vec3d &m, Mask mask=true) const
 PDF of sampling the NDF.
 
- Public Member Functions inherited from sgd_base< CONF, NAME >
 BBM_IMPORT_CONFIG (CONF)
 
Spectrum eval (const Vec3d &halfway, Mask mask=true) const
 Evaluate the NDF.
 
Vec3d sample (const Vec3d &view, const Vec2d &xi, Mask mask=true) const
 Sample the NDF.
 
Value pdf (const Vec3d &view, const Vec3d &m, Mask mask=true) const
 PDF of sampling the NDF.
 
Value G1 (const Vec3d &, const Vec3d &, Mask=true) const
 Monodirectional shadowing and masking factor.
 
 BBM_DEFAULT_CONSTRUCTOR (sgd_base)
 Default Constructor.
 
 BBM_ATTRIBUTES (alpha, p)
 

Static Public Attributes

static constexpr string_literal name = NAME
 
- Static Public Attributes inherited from sgd_base< CONF, NAME >
static constexpr string_literal name = NAME
 

Private Types

using base = sgd_base< CONF >
 

Private Member Functions

 BBM_BASETYPES (base)
 

Class Attributes

bsdf_parameter< Spectrum, bsdf_attr::Dependent, 7.5 > K
 
bsdf_parameter< Spectrum, bsdf_attr::DependentLambda
 
bsdf_parameter< Spectrum, bsdf_attr::Dependentc
 
bsdf_parameter< Spectrum, bsdf_attr::Dependentk
 
bsdf_parameter< Spectrum, bsdf_attr::Dependent, constants< Scalar >::Pi(0.5)> theta0
 
 BBM_ATTRIBUTES (K, Lambda, c, theta0, k)
 

Additional Inherited Members

- Public Attributes inherited from sgd_base< CONF, NAME >
specular_roughness< Spectrum > alpha
 
bsdf_parameter< Spectrum, bsdf_attr::SpecularParameter, 0.64 > p
 

Detailed Description

template<typename CONF, string_literal NAME = "SGD">
requires concepts::config<CONF>
class bbm::ndf::sgd< CONF, NAME >

The SGD microfacet distribution with fitted shadowing and masking.

Template Parameters
CONF= bbm configuration
NAME= ndf name (default = SGD)

Implements: concepts::ndf

Member Typedef Documentation

◆ base

using base = sgd_base<CONF>
private

Member Function Documentation

◆ BBM_ATTRIBUTES()

BBM_ATTRIBUTES ( K  ,
Lambda  ,
c  ,
theta0  ,
k   
)

◆ BBM_BASETYPES()

BBM_BASETYPES ( base  )
private

◆ BBM_DEFAULT_CONSTRUCTOR()

BBM_DEFAULT_CONSTRUCTOR ( sgd< CONF, NAME >  )
inline

Default Constructor.

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( CONF  )

◆ eval()

Spectrum eval ( const Vec3d &  halfway,
Mask  mask = true 
) const
inline

Evaluate the NDF.

Parameters
halfway= vector to eval the NDF for
mask= enable/disbale lanes [default = true]
Returns
the resulting evaluation of the NDF

◆ G1()

Spectrum G1 ( const Vec3d &  v,
const Vec3d &  m,
Mask  mask = true 
) const
inline

Monodirectional shadowing and masking term.

Parameters
v= incident/outgoing vector
m= microfacet normal \param mask = enable/disable lanes
Returns
the monodirectional shadowing and masking attentuation factor

◆ pdf()

Value pdf ( const Vec3d &  view,
const Vec3d &  m,
Mask  mask = true 
) const
inline

PDF of sampling the NDF.

Parameters
view= view direction
m= sampled microfacet normal
mask= enable/disable lanes [default = true]
Returns
the PDF of sampling 'm' using the sample method.

◆ sample()

Vec3d sample ( const Vec3d &  view,
const Vec2d &  xi,
Mask  mask = true 
) const
inline

Sample the NDF.

Parameters
view= view direction
xi= 2D uniform random variables in [0..1] range
Mask= enable/disbale lanes
Returns
A sampled microfacet normal.

Member Data Documentation

◆ c

◆ K

◆ k

◆ Lambda

◆ name

constexpr string_literal name = NAME
staticconstexpr

◆ theta0

bsdf_parameter<Spectrum, bsdf_attr::Dependent, constants<Scalar>::Pi(0.5)> theta0

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