Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
IsoTrowbridgeReitzConstant.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace ph
6{
7
9{
10public:
12 real alpha,
13 EMaskingShadowing maskingShadowingType);
14
15 std::array<real, 2> getAlphas(const SurfaceHit& X) const override;
16
17private:
18 real m_alpha;
19};
20
21// In-header Implementations:
22
24 const real alpha,
25 const EMaskingShadowing maskingShadowingType)
26
27 : IsoTrowbridgeReitz(maskingShadowingType)
28
29 , m_alpha(alpha > 0.001_r ? alpha : 0.001_r)
30{}
31
32inline std::array<real, 2> IsoTrowbridgeReitzConstant::getAlphas(const SurfaceHit& /* X */) const
33{
34 return {m_alpha, m_alpha};
35}
36
37}// end namespace ph
Definition IsoTrowbridgeReitzConstant.h:9
std::array< real, 2 > getAlphas(const SurfaceHit &X) const override
Definition IsoTrowbridgeReitzConstant.h:32
IsoTrowbridgeReitzConstant(real alpha, EMaskingShadowing maskingShadowingType)
Definition IsoTrowbridgeReitzConstant.h:23
Isotropic Trowbridge-Reitz distribution (GGX).
Definition IsoTrowbridgeReitz.h:11
General information about a ray-surface intersection event.
Definition SurfaceHit.h:59
The root for all renderer implementations.
Definition EEngineProject.h:6
EMaskingShadowing
Different types of masking and shadowing terms for microfacet distributions. Eric Heitz has published...
Definition enums.h:11