Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
IsoBeckmann.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace ph
6{
7
13{
14public:
16 real alpha,
17 EMaskingShadowing maskingShadowingType);
18
19 std::array<real, 2> getAlphas(const SurfaceHit& X) const override;
20
21 real lambda(
22 const SurfaceHit& X,
23 const math::Vector3R& N,
24 const math::Vector3R& H,
25 const math::Vector3R& unitDir,
26 const std::array<real, 2>& alphas) const override;
27
28 real distribution(
29 const SurfaceHit& X,
30 const math::Vector3R& N,
31 const math::Vector3R& H) const override;
32
33 void sampleH(
34 const SurfaceHit& X,
35 const math::Vector3R& N,
36 const std::array<real, 2>& sample,
37 math::Vector3R* out_H) const override;
38
39private:
40 real m_alpha;
41};
42
43inline std::array<real, 2> IsoBeckmann::getAlphas(const SurfaceHit& /* X */) const
44{
45 return {m_alpha, m_alpha};
46}
47
48}// end namespace ph
Isotropic Beckmann distribution. See the paper "Microfacet Models for Refraction through Rough Surfac...
Definition IsoBeckmann.h:13
real distribution(const SurfaceHit &X, const math::Vector3R &N, const math::Vector3R &H) const override
Distribution of the microfacet normal. The term. Also commonly knwon as the NDF (normal distribution...
Definition IsoBeckmann.cpp:47
std::array< real, 2 > getAlphas(const SurfaceHit &X) const override
Definition IsoBeckmann.h:43
IsoBeckmann(real alpha, EMaskingShadowing maskingShadowingType)
Definition IsoBeckmann.cpp:14
real lambda(const SurfaceHit &X, const math::Vector3R &N, const math::Vector3R &H, const math::Vector3R &unitDir, const std::array< real, 2 > &alphas) const override
The function that appears in the masking-shadowing term. For isotropic distributions,...
Definition IsoBeckmann.cpp:24
void sampleH(const SurfaceHit &X, const math::Vector3R &N, const std::array< real, 2 > &sample, math::Vector3R *out_H) const override
Generate a microfacet normal H for the distribution. This samples all possible H vectors for the dist...
Definition IsoBeckmann.cpp:67
Definition ShapeInvariantMicrofacet.h:16
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