Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ashikhminshirleyfull< CONF, Fresnel, Symmetry, NAME > Struct Template Reference

the Anisotropic Phong BSSF model by Ashikhmin and Shirley. This implements the combined diffuse+specular component of the model. The combined model is implemented as a single model due to the dependence of the diffuse term on the specular fresnel reflectance. More...

#include <ashikhminshirleyfull.h>

Inherits ashikhminshirley< CONF, fresnel::schlick< CONF, ior::reflectance< Spectrum_t< CONF > > >, symmetry_v::Anisotropic >.

Public Types

using base = ashikhminshirley< CONF, Fresnel, Symmetry >
 

Public Member Functions

 BBM_BASETYPES (base)
 
 BBM_IMPORT_CONFIG (CONF)
 
Spectrum eval (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const
 Evaluate the BSDF for a given in and out direction.
 
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 BSDF given a direction and two random variables.
 
Value pdf (const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=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=unit_t::Radiance, Mask mask=true) const
 Return the (approximate) reflectance of the BSDF.
 
 BBM_DEFAULT_CONSTRUCTOR (ashikhminshirleyfull)
 Default constructor.
 

Public Attributes

 BBM_BSDF_FORWARD
 

Static Public Attributes

static constexpr string_literal name = NAME
 
diffuse_scale< Spectrum > diffuseReflectance
 Class Attributes.
 
 BBM_ATTRIBUTES (diffuseReflectance)
 

Detailed Description

template<typename CONF, typename Fresnel = fresnel::schlick<CONF, ior::reflectance<Spectrum_t<CONF>>>, symmetry_v Symmetry = symmetry_v::Anisotropic, string_literal NAME = "AshikhminShirleyFull">
requires concepts::config<CONF> && concepts::fresnel<Fresnel> && concepts::matching_config<CONF, Fresnel>
struct bbm::ashikhminshirleyfull< CONF, Fresnel, Symmetry, NAME >

the Anisotropic Phong BSSF model by Ashikhmin and Shirley. This implements the combined diffuse+specular component of the model. The combined model is implemented as a single model due to the dependence of the diffuse term on the specular fresnel reflectance.

Template Parameters
CONF= bbm configuration
Fresnel= fresnel implementation (requires concepts::Fresnel); default = fresnel::schlick<Config, ior::reflectance<Spectrum>>
Symmetry= pass symmetry_v (Default: symmetry_v::Anisotropic)
NAME= name of the BSDF model (Default: 'AshikhminShirleyFull')

Implements: concepts::bsdfmodel

Member Typedef Documentation

◆ base

using base = ashikhminshirley<CONF, Fresnel, Symmetry>

Member Function Documentation

◆ BBM_ATTRIBUTES()

BBM_ATTRIBUTES ( diffuseReflectance  )

◆ BBM_BASETYPES()

BBM_BASETYPES ( base  )

◆ BBM_DEFAULT_CONSTRUCTOR()

BBM_DEFAULT_CONSTRUCTOR ( ashikhminshirleyfull< CONF, Fresnel, Symmetry, NAME >  )
inline

Default constructor.

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( CONF  )

◆ eval()

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

Evaluate the BSDF for a given in and out direction.

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 = 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 = unit_t::Radiance,
Mask  mask = true 
) const
inline

Return the (approximate) 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 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 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

◆ diffuseReflectance

diffuse_scale<Spectrum> diffuseReflectance

Class Attributes.

◆ name

constexpr string_literal name = NAME
staticconstexpr

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