Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ThinDielectricShell.h
Go to the documentation of this file.
1#pragma once
2
7
8#include <Common/primitive_type.h>
9
10#include <memory>
11
12namespace ph
13{
14
16{
17public:
18 explicit ThinDielectricShell(std::shared_ptr<DielectricFresnel> fresnel);
19
21 std::shared_ptr<DielectricFresnel> fresnel,
22 std::shared_ptr<TTexture<real>> thickness,
23 std::shared_ptr<TTexture<math::Spectrum>> sigmaT);
24
26 std::shared_ptr<DielectricFresnel> fresnel,
27 std::shared_ptr<TTexture<math::Spectrum>> reflectionScale,
28 std::shared_ptr<TTexture<math::Spectrum>> transmissionScale);
29
31 std::shared_ptr<DielectricFresnel> fresnel,
32 std::shared_ptr<TTexture<real>> thickness,
33 std::shared_ptr<TTexture<math::Spectrum>> sigmaT,
34 std::shared_ptr<TTexture<math::Spectrum>> reflectionScale,
35 std::shared_ptr<TTexture<math::Spectrum>> transmissionScale);
36
37 ESurfacePhenomenon getPhenomenonOf(SurfaceElemental elemental) const override;
38
39private:
40 void calcBsdf(
41 const BsdfQueryContext& ctx,
42 const BsdfEvalInput& in,
43 BsdfEvalOutput& out) const override;
44
45 void genBsdfSample(
46 const BsdfQueryContext& ctx,
47 const BsdfSampleInput& in,
48 SampleFlow& sampleFlow,
49 BsdfSampleOutput& out) const override;
50
51 void calcBsdfPdf(
52 const BsdfQueryContext& ctx,
53 const BsdfPdfInput& in,
54 BsdfPdfOutput& out) const override;
55
56private:
57 constexpr static SurfaceElemental REFLECTION = 0;
58 constexpr static SurfaceElemental TRANSMISSION = 1;
59
60 std::shared_ptr<DielectricFresnel> m_fresnel;
61 std::shared_ptr<TTexture<real>> m_thickness;
62 std::shared_ptr<TTexture<math::Spectrum>> m_sigmaT;
63 std::shared_ptr<TTexture<math::Spectrum>> m_reflectionScale;
64 std::shared_ptr<TTexture<math::Spectrum>> m_transmissionScale;
65};
66
67}// 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 TTexture.h:12
Definition ThinDielectricShell.h:16
ThinDielectricShell(std::shared_ptr< DielectricFresnel > fresnel)
Definition ThinDielectricShell.cpp:19
ESurfacePhenomenon getPhenomenonOf(SurfaceElemental elemental) const override
Get the phenomenon of a surface component. One can also setup query for a specific elemental....
Definition ThinDielectricShell.cpp:75
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