1#ifndef _BBM_FRESNEL_SCHLICK_H_
2#define _BBM_FRESNEL_SCHLICK_H_
19 template<
typename CONF,
typename PARAM=ior::reflectance<Value_t<CONF>>>
requires concepts::config<CONF>
42 static constexpr typename std::decay_t<parameter_type>::type
eval(
const parameter_type& param,
const Value& cosTheta, Mask mask=
true)
45 if(bbm::none(mask))
return 0;
51 return bbm::select(mask, R0 + (Scalar(1.0) - R0) * bbm::pow(Scalar(1.0) - cosTheta, 5.0), 0);
All BBM methods are defined to operate on a variety of value types and spectrum types....
fresnel concept
Definition: fresnel.h:27
#define BBM_CHECK_CONCEPT(CONCEPTNAME, CLASSNAME,...)
Check a class for a concept with bbm::concepts::archetypes in the namespace.
Definition: macro.h:35
void fresnel(py::module &m, const std::string &prefix="")
Define a python interface for ior::ior and ior::reflectance given a value type T.
Definition: py_fresnel.h:22
Definition: aggregatebsdf.h:29
constexpr auto select(MASK &&mask, const A &a, const A &b)
Definition: backbone.h:255
typename get_config< T >::Value Value_t
Definition: config.h:67
typename get_config< T >::Spectrum Spectrum_t
Definition: config.h:68
Base declaration of attribute; further specialized below.
Definition: attribute.h:26
Implements the Fresnel reflectance equation as proposed by Schlick [Comp. Graph. Forum '94]: https://...
Definition: fresnel_schlick.h:21
PARAM parameter_type
Fresnel Parameter Type.
Definition: fresnel_schlick.h:25
static constexpr std::decay_t< parameter_type >::type eval(const parameter_type ¶m, const Value &cosTheta, Mask mask=true)
Evaluate Fresnel reflectance.
Definition: fresnel_schlick.h:42