Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
OrenNayar.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <Common/primitive_type.h>
8
9#include <memory>
10
11namespace ph
12{
13
15{
16public:
18 const std::shared_ptr<TTexture<math::Spectrum>>& albedo,
19 real sigmaDegrees);
20
22 const std::shared_ptr<TTexture<math::Spectrum>>& albedo,
23 const std::shared_ptr<TTexture<real>>& sigmaDegrees);
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<TTexture<math::Spectrum>> m_albedo;
48 std::shared_ptr<TTexture<real>> m_sigmaDegrees;
49};
50
51// In-header Implementations:
52
53inline std::string OrenNayar::toString() const
54{
55 return "Oren Nayar, " + 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
Definition OrenNayar.h:15
ESurfacePhenomenon getPhenomenonOf(SurfaceElemental elemental) const override
Get the phenomenon of a surface component. One can also setup query for a specific elemental....
Definition OrenNayar.cpp:45
std::string toString() const override
Definition OrenNayar.h:53
OrenNayar(const std::shared_ptr< TTexture< math::Spectrum > > &albedo, real sigmaDegrees)
Definition OrenNayar.cpp:20
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
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