Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
microfacet< NDF, MaskingShadowing, Fresnel, NormalizationFactor, NAME > Struct Template Reference

General microfacet BRDF model. More...

#include <microfacet.h>

Inherited by lowmicrofacet< CONF, NormalizationFactor, NAME >.

Public Member Functions

 BBM_IMPORT_CONFIG (NDF)
 
Spectrum eval (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const
 Evaluate the BSDF for a given in-out direction pair.
 
BsdfSample sample (const Vec3d &out, const Vec2d &xi, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const
 Sample the microfacet BSDF given a direction and two random variables.
 
Value pdf (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const
 Compute the pdf given an in and out direction.
 
Spectrum reflectance (const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const
 Return the (approximate) hemispherical reflectance of the BSDF.
 
 BBM_DEFAULT_CONSTRUCTOR (microfacet)
 Default constructor.
 

Public Attributes

 BBM_BSDF_FORWARD
 

Static Public Attributes

static constexpr string_literal name = NAME
 

Class Attributes are copied from the NDF

NDF ndf
 
fresnel_parameter< typename std::decay_t< Fresnel >::parameter_type > eta
 
 BBM_ATTRIBUTES (reflection::attributes(ndf), eta)
 

Detailed Description

template<typename NDF, typename MaskingShadowing, typename Fresnel, auto NormalizationFactor = microfacet_n::Unnormalized, string_literal NAME = "microfacet">
requires concepts::matching_config<NDF, MaskingShadowing, Fresnel> && concepts::ndf<NDF> && concepts::maskingshadowing<MaskingShadowing> && std::default_initializable<NDF> && concepts::fresnel<Fresnel>
struct bbm::microfacet< NDF, MaskingShadowing, Fresnel, NormalizationFactor, NAME >

General microfacet BRDF model.

Template Parameters
NDF= microfacet normal distribution (concepts::ndf && std::default_initializable)
MaskingShadowing= masking and shadowing function (concepts::maskingshadowing)
Fresnel= fresnel implementation (requires concepts::fresnel)
NormalizationFactor= see microfacet_n
NAME= model name

NDF, MaskingShadowing, and Fresnel must also meet config::matching_config

Implements: concepts::bsdfmodel

Member Function Documentation

◆ BBM_ATTRIBUTES()

BBM_ATTRIBUTES ( reflection::attributes(ndf ,
eta   
)

◆ BBM_DEFAULT_CONSTRUCTOR()

BBM_DEFAULT_CONSTRUCTOR ( microfacet< NDF, MaskingShadowing, Fresnel, NormalizationFactor, NAME >  )
inline

Default constructor.

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( NDF  )

◆ eval()

Spectrum eval ( const Vec3d &  in,
const Vec3d &  out,
BsdfFlag  component = bsdf_flag::All,
unit_t  = unit_t::Radiance,
Mask  mask = true 
) const
inline

Evaluate the BSDF for a given in-out direction pair.

Parameters
in= incident direction
out= outgoing direction
component= which reflectance component to eval
unit= unit of computation (ignored)
mask= masking of lanes (e.g., for Packet eval)
Returns
Evaluation of the BSDF per spectrum.

◆ pdf()

Value pdf ( const Vec3d &  in,
const Vec3d &  out,
BsdfFlag  component = bsdf_flag::All,
unit_t  = unit_t::Radiance,
Mask  mask = true 
) const
inline

Compute the pdf given an in and out direction.

Parameters
in= the incoming (sampled) direction
out= the outgoing (given) direction
component= which reflectance component was sampled
unit= unit of computation (ignored)
mask= masking of lanes
Returns
the PDF that the incoming direction would be sampled given the outgoing direction.

◆ reflectance()

Spectrum reflectance ( const Vec3d &  out,
BsdfFlag  component = bsdf_flag::All,
unit_t  = unit_t::Radiance,
Mask  mask = true 
) const
inline

Return the (approximate) hemispherical reflectance of the BSDF.

Parameters
out= the outgoing direction
component= which reflectance component to eval
unit= unit of computation (ignored)
mask= masking of lanes
Returns
the approximate hemispherical reflectance of the BSDF for a given direction

◆ sample()

BsdfSample sample ( const Vec3d &  out,
const Vec2d &  xi,
BsdfFlag  component = bsdf_flag::All,
unit_t  unit = unit_t::Radiance,
Mask  mask = true 
) const
inline

Sample the microfacet BSDF given a direction and two random variables.

Parameters
out= outgoing direction
xi= two random variables stored in a Vec2d
component= which reflectance component to sample
unit= unit of computation (ignored)
mask= masking of lanes.
Returns
A bsdfSample containing the sampled direction and the corresponding pdf.

Member Data Documentation

◆ BBM_BSDF_FORWARD

BBM_BSDF_FORWARD

◆ eta

fresnel_parameter<typename std::decay_t<Fresnel>::parameter_type> eta

◆ name

constexpr string_literal name = NAME
staticconstexpr

◆ ndf

NDF ndf

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