1#ifndef _BBM_MASKINGSHADOWING_VGROOVE_H_
2#define _BBM_MASKINGSHADOWING_VGROOVE_H_
15 namespace maskingshadowing {
24 template<
typename CONF>
requires concepts::config<CONF>
30 static constexpr Value
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);
41 auto G = bbm::min( 1.0, bbm::min(
All necessary include files for defining new joint masking and shadowing functions.
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
constexpr decltype(auto) z(bbm::vec3d< T > &v)
Definition: vec.h:26
Definition: aggregatebsdf.h:29
constexpr auto select(MASK &&mask, const A &a, const A &b)
Definition: backbone.h:255
Vgroove shadowing and masking.
Definition: vgroove.h:26
static constexpr Value eval(const NDF &ndf, const Vec3d &in, const Vec3d &out, const Vec3d &m, Mask mask=true)
Definition: vgroove.h:30