Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | List of all members
cook< CONF, PARAM > Struct Template Reference

Implements the Fresnel reflectance equation as proposed by Cook and Torrance [SIGGRAPH'82]: https://doi.org/10.1145/357290.357293. More...

#include <fresnel_cook.h>

Public Types

using parameter_type = PARAM
 Fresnel Parameter Type.
 

Public Member Functions

 BBM_IMPORT_CONFIG (CONF)
 

Static Public Member Functions

static constexpr std::decay_t< parameter_type >::type eval (const parameter_type &param, const Value &cosTheta, Mask mask=true)
 Evaluate Fresnel reflectance.
 

Detailed Description

template<typename CONF, typename PARAM = ior::ior<Value_t<CONF>>>
requires concepts::config<CONF>
struct bbm::fresnel::cook< CONF, PARAM >

Implements the Fresnel reflectance equation as proposed by Cook and Torrance [SIGGRAPH'82]: https://doi.org/10.1145/357290.357293.

Template Parameters
CONF= bbm configuration
PARAM= parameter type (ior)

Implements: concepts::fresnel

Member Typedef Documentation

◆ parameter_type

using parameter_type = PARAM

Fresnel Parameter Type.

Member Function Documentation

◆ BBM_IMPORT_CONFIG()

BBM_IMPORT_CONFIG ( CONF  )

◆ eval()

static constexpr std::decay_t< parameter_type >::type eval ( const parameter_type param,
const Value &  cosTheta,
Mask  mask = true 
)
inlinestaticconstexpr

Evaluate Fresnel reflectance.

This method follows Cook and Torrance's [SIGGRAPH' 82] suggested evaluation of the Fresnel reflectance (https://doi.org/10.1145/357290.357293). The method takes either ior or reflectance (relies on auto-conversion to ior), as well as the dot product between view and halfway vector (cosTheta) as input.

Parameters
param= index of refraction
cosTheta= dot product between view and halfway.
mask= mask compute lines
Returns
Fresnel reflectance with the type determined from the underlying type of the parameter.

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