Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
OpaqueMicrofacet.h
Go to the documentation of this file.
1#pragma once
2
4#include "Math/TVector3.h"
8
9#include <memory>
10
11namespace ph
12{
13
19{
20public:
22 const std::shared_ptr<ConductorFresnel>& fresnel,
23 const std::shared_ptr<Microfacet>& microfacet);
24
25 ESurfacePhenomenon getPhenomenonOf(SurfaceElemental elemental) const override;
26
27 std::string toString() const override;
28
29private:
30 void calcBsdf(
31 const BsdfQueryContext& ctx,
32 const BsdfEvalInput& in,
33 BsdfEvalOutput& out) const override;
34
35 void genBsdfSample(
36 const BsdfQueryContext& ctx,
37 const BsdfSampleInput& in,
38 SampleFlow& sampleFlow,
39 BsdfSampleOutput& out) const override;
40
41 void calcBsdfPdf(
42 const BsdfQueryContext& ctx,
43 const BsdfPdfInput& in,
44 BsdfPdfOutput& out) const override;
45
46private:
47 std::shared_ptr<Microfacet> m_microfacet;
48 std::shared_ptr<FresnelEffect> m_fresnel;
49};
50
51// In-header Implementations:
52
53inline std::string OpaqueMicrofacet::toString() const
54{
55 return "Opaque Microfacet, " + SurfaceOptics::toString();
56}
57
58}// 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
Microfacet based opaque surface model. Microfacet optical behavior modeled using Cook-Torrance BRDF C...
Definition OpaqueMicrofacet.h:19
OpaqueMicrofacet(const std::shared_ptr< ConductorFresnel > &fresnel, const std::shared_ptr< Microfacet > &microfacet)
Definition OpaqueMicrofacet.cpp:38
ESurfacePhenomenon getPhenomenonOf(SurfaceElemental elemental) const override
Get the phenomenon of a surface component. One can also setup query for a specific elemental....
Definition OpaqueMicrofacet.cpp:52
std::string toString() const override
Definition OpaqueMicrofacet.h:53
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
virtual std::string toString() const
Definition SurfaceOptics.h:104
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