1#ifndef _BBM_LOW_MICROFACET_H_
2#define _BBM_LOW_MICROFACET_H_
38 template<
typename CONF,
auto NormalizationFactor =
microfacet_n::Cook, string_literal NAME =
"LowMicrofacet">
requires concepts::config<CONF>
40 maskingshadowing::vgroove<CONF>,
67 return base::eval(in, out, component, unit, mask) *
A;
All includes and helpers needed for declaring new bsdfmodels.
#define BBM_EXPORT_BSDFMODEL(BsdfModel)
Definition: bbm_fromstring.h:49
The Low et al. Microfacet BRDF model.
Definition: lowmicrofacet.h:44
bsdf_parameter< Spectrum, bsdf_attr::SpecularParameter > A
Class Attributes.
Definition: lowmicrofacet.h:88
BBM_DEFAULT_CONSTRUCTOR(lowmicrofacet)
Default constructor.
Definition: lowmicrofacet.h:94
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 A*baseeval.
Definition: lowmicrofacet.h:65
Spectrum reflectance(const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t unit=unit_t::Radiance, Mask mask=true) const
Return albedo*basereflectance.
Definition: lowmicrofacet.h:79
static constexpr string_literal name
Definition: lowmicrofacet.h:49
#define BBM_CHECK_CONCEPT(CONCEPTNAME, CLASSNAME,...)
Check a class for a concept with bbm::concepts::archetypes in the namespace.
Definition: macro.h:35
Microfacet BSDF model following "Microfacet Models for Refraction through Rough Surfaces" [Walter et ...
Definition: aggregatebsdf.h:29
unit_t
Light Unit.
Definition: unit.h:21
Base declaration of attribute; further specialized below.
Definition: attribute.h:26
Implements Low et al.'s Microfacet Normal Distribution from "BRDF models for accurate and efficient r...
Implements the Fresnel reflectance equation as proposed by Cook and Torrance [SIGGRAPH'82]: https://d...
Definition: fresnel_cook.h:21
Vgroove shadowing and masking.
Definition: vgroove.h:26
static constexpr literal Cook
Definition: microfacet.h:35
General microfacet BRDF model.
Definition: microfacet.h:58
Spectrum eval(const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const
Evaluate the BSDF for a given in-out direction pair.
Definition: microfacet.h:74
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 microfacet BSDF given a direction and two random variables.
Definition: microfacet.h:115
Spectrum reflectance(const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const
Return the (approximate) hemispherical reflectance of the BSDF.
Definition: microfacet.h:186
Value pdf(const Vec3d &in, const Vec3d &out, BsdfFlag component=bsdf_flag::All, unit_t=unit_t::Radiance, Mask mask=true) const
Compute the pdf given an in and out direction.
Definition: microfacet.h:154
Definition: string_literal.h:16
Vgroove shadowing and masking. Based on Torrance and Sparrow, 19967, "Theory for off-specular reflect...