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

The unnormalized SGD microfacet distribution and without shadowing and masking. More...

#include <sgd.h>

Inherited by sgd< CONF, NAME >.

Public Member Functions

 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.
 

Static Public Attributes

static constexpr string_literal name = NAME
 

Class Attributes

specular_roughness< Spectrum > alpha
 
bsdf_parameter< Spectrum, bsdf_attr::SpecularParameter, 0.64 > p
 
 BBM_ATTRIBUTES (alpha, p)
 

Detailed Description

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

The unnormalized SGD microfacet distribution and without shadowing and masking.

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

Implements: concepts::ndf

Member Function Documentation

◆ BBM_ATTRIBUTES()

BBM_ATTRIBUTES ( alpha  ,
p   
)

◆ BBM_DEFAULT_CONSTRUCTOR()

BBM_DEFAULT_CONSTRUCTOR ( sgd_base< 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()

Value G1 ( const Vec3d &  ,
const Vec3d &  ,
Mask  = true 
) const
inline

Monodirectional shadowing and masking factor.

Parameters
v= incident/exitant direction of transport
m= microfacet normal.
mask= enable/disable lanes [default = true]

Bagher et al. did not present an analytical solution and instead relied on a fitted rational approximation of the shadowing and masking function.

◆ 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

◆ alpha

specular_roughness<Spectrum> alpha

◆ name

constexpr string_literal name = NAME
staticconstexpr

◆ p


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