Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ThinDielectricFilm.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <memory>
9#include <vector>
10
11namespace ph
12{
13
15{
16public:
18 const std::shared_ptr<DielectricFresnel>& fresnel,
19 const std::vector<math::SampledSpectrum>& reflectanceTable,
20 const std::vector<math::SampledSpectrum>& transmittanceTable);
21
22 ESurfacePhenomenon getPhenomenonOf(SurfaceElemental elemental) const override;
23
24private:
25 void calcBsdf(
26 const BsdfQueryContext& ctx,
27 const BsdfEvalInput& in,
28 BsdfEvalOutput& out) const override;
29
30 void genBsdfSample(
31 const BsdfQueryContext& ctx,
32 const BsdfSampleInput& in,
33 SampleFlow& sampleFlow,
34 BsdfSampleOutput& out) const override;
35
36 void calcBsdfPdf(
37 const BsdfQueryContext& ctx,
38 const BsdfPdfInput& in,
39 BsdfPdfOutput& out) const override;
40
41private:
42 constexpr static SurfaceElemental REFLECTION = 0;
43 constexpr static SurfaceElemental TRANSMISSION = 1;
44
45 std::shared_ptr<DielectricFresnel> m_fresnel;
46 std::vector<math::SampledSpectrum> m_reflectanceTable;
47 std::vector<math::SampledSpectrum> m_transmittanceTable;
48};
49
50}// end namespace ph
Input for BsdfEvalQuery.
Definition BsdfEvalQuery.h:20
Output for BsdfEvalQuery.
Definition BsdfEvalQuery.h:47
Input for BsdfPdfQuery.
Definition BsdfPdfQuery.h:19
Output for BsdfPdfQuery.
Definition BsdfPdfQuery.h:46
The environment a BSDF query is performed under.
Definition BsdfQueryContext.h:13
Input for BsdfSampleQuery.
Definition BsdfSampleQuery.h:21
Output for BsdfSampleQuery.
Definition BsdfSampleQuery.h:45
A sample with arbitrary dimensions with fine-grained sampling control.
Definition SampleFlow.h:19
Describes how light interacts with a surface.
Definition SurfaceOptics.h:17
Definition ThinDielectricFilm.h:15
ThinDielectricFilm(const std::shared_ptr< DielectricFresnel > &fresnel, const std::vector< math::SampledSpectrum > &reflectanceTable, const std::vector< math::SampledSpectrum > &transmittanceTable)
Definition ThinDielectricFilm.cpp:16
ESurfacePhenomenon getPhenomenonOf(SurfaceElemental elemental) const override
Get the phenomenon of a surface component. One can also setup query for a specific elemental....
Definition ThinDielectricFilm.cpp:35
The root for all renderer implementations.
Definition EEngineProject.h:6
ESurfacePhenomenon
Available surface phenomena.
Definition surface_optics_fwd.h:16
int SurfaceElemental
Definition surface_optics_fwd.h:30