Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
IsoTrowbridgeReitz.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace ph
6{
7
11{
12public:
13 explicit IsoTrowbridgeReitz(
14 EMaskingShadowing maskingShadowingType);
15
16 std::array<real, 2> getAlphas(const SurfaceHit& X) const override = 0;
17
18 real lambda(
19 const SurfaceHit& X,
20 const math::Vector3R& N,
21 const math::Vector3R& H,
22 const math::Vector3R& unitDir,
23 const std::array<real, 2>& alphas) const override;
24
25 real distribution(
26 const SurfaceHit& X,
27 const math::Vector3R& N,
28 const math::Vector3R& H) const override;
29
30 void sampleH(
31 const SurfaceHit& X,
32 const math::Vector3R& N,
33 const std::array<real, 2>& sample,
34 math::Vector3R* out_H) const override;
35};
36
37}// end namespace ph
Isotropic Trowbridge-Reitz distribution (GGX).
Definition IsoTrowbridgeReitz.h:11
IsoTrowbridgeReitz(EMaskingShadowing maskingShadowingType)
Definition IsoTrowbridgeReitz.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 IsoTrowbridgeReitz.cpp:20
std::array< real, 2 > getAlphas(const SurfaceHit &X) const override=0
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 IsoTrowbridgeReitz.cpp:36
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 IsoTrowbridgeReitz.cpp:58
General information about a ray-surface intersection event.
Definition SurfaceHit.h:59
Trowbridge-Reitz distribution (GGX). See the original paper by Trowbridge et al. Trowbridge:1975:Aver...
Definition TrowbridgeReitz.h:14
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