1#ifndef _BBM_MASKINGSHADOWING_HEIGHT_CORRELATED_H_
2#define _BBM_MASKINGSHADOWING_HEIGHT_CORRELATED_H_
15 namespace maskingshadowing {
30 static constexpr auto eval(
const NDF& ndf,
const Vec3d& in,
const Vec3d& out,
const Vec3d& m, Mask mask=
true)
32 using return_t =
decltype(ndf.G1(in, m, mask));
35 mask &= (bbm::dot(in, m) > 0) && (bbm::dot(out, m) > 0);
38 if(bbm::none(mask))
return return_t(0);
44 auto gi = ndf.G1(in, m, mask);
45 auto go = ndf.G1(out, m, mask);
47 auto denom = gi + go - gio;
50 mask &= (denom > Constants::Epsilon());
All necessary include files for defining new joint masking and shadowing functions.
config concept
Definition: config.h:31
maskingshadowing concept
Definition: maskingshadowing.h:24
matching_config concept
Definition: config.h:63
ndf concept
Definition: ndf.h:29
#define BBM_CHECK_CONCEPT(CONCEPTNAME, CLASSNAME,...)
Check a class for a concept with bbm::concepts::archetypes in the namespace.
Definition: macro.h:35
Definition: aggregatebsdf.h:29
constexpr auto select(MASK &&mask, const A &a, const A &b)
Definition: backbone.h:255