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