48 const std::shared_ptr<Geometry>& srcGeometry,
66 ClassType clazz(
"geometric-light");
67 clazz.docName(
"Geometric Light Actor");
69 "Energy emitters that come with a physical geometry. Please be aware that changing "
70 "sampling techniques to non-default values may cause the rendered image to lose energy. "
71 "For example, disabling BSDF sampling may cause some/all caustics to disappear on "
72 "specular surfaces.");
76 directlyVisible.description(
77 "Whether the light is directly visible. For example, you can see a bright sphere "
78 "for a directly visible spherical area light.");
79 directlyVisible.defaultTo(
true);
80 directlyVisible.optional();
81 clazz.addField(directlyVisible);
85 "Whether to use BSDF sampling technique for rendering the light, i.e., choosing a "
86 "direction based on BSDF and relying on randomly hitting a light.");
89 clazz.addField(bsdfSample);
93 "Whether to use direct sampling technique for rendering the light, i.e., directly "
94 "establish a connection from a light to the illuminated location.");
97 clazz.addField(directSample);
101 "Whether to use emission sampling technique for rendering the light, i.e., start "
102 "rendering the light from the light source itself.");
105 clazz.addField(emissionSample);
Definition AGeometricLight.h:18
virtual std::shared_ptr< Material > getMaterial(const CookingContext &ctx) const
Definition AGeometricLight.cpp:24
bool m_isDirectlyVisible
Definition AGeometricLight.h:58
virtual const Emitter * buildEmitter(const CookingContext &ctx, TSpanView< const Primitive * > lightPrimitives) const =0
bool m_useEmissionSample
Definition AGeometricLight.h:61
static std::shared_ptr< Geometry > getSanifiedGeometry(const std::shared_ptr< Geometry > &srcGeometry, const TransformInfo &srcLocalToWorld, math::TDecomposedTransform< real > *out_remainingLocalToWorld=nullptr)
Definition AGeometricLight.cpp:188
PH_DEFINE_SDL_CLASS(TSdlOwnerClass< AGeometricLight >)
Definition AGeometricLight.h:64
PreCookReport preCook(const CookingContext &ctx) const override
Cooking supplemental data before cook(). This method allows user to specify additional configurations...
Definition AGeometricLight.cpp:29
bool m_useDirectSample
Definition AGeometricLight.h:60
bool m_useBsdfSample
Definition AGeometricLight.h:59
virtual EmitterFeatureSet getEmitterFeatureSet() const
Definition AGeometricLight.cpp:157
virtual std::shared_ptr< Geometry > getGeometry(const CookingContext &ctx) const =0
TransientVisualElement cook(const CookingContext &ctx, const PreCookReport &report) const override
Definition AGeometricLight.cpp:51
Information about the world being cooked.
Definition CookingContext.h:24
An electromagnetic energy emitting source. The emitted energy can be captured by a Receiver.
Definition Emitter.h:68
Definition PreCookReport.h:13
Manipulate a value type where each bit is a binary flag.
Definition TBitFlags.h:17
A field class that binds a bool member variable.
Definition TSdlBool.h:21
SDL binding type for a canonical SDL resource class.
Definition TSdlOwnerClass.h:23
TSdlValue & description(std::string descriptionStr)
Definition TSdlValue.ipp:95
TSdlValue & optional()
Definition TSdlValue.ipp:103
TSdlValue & defaultTo(T defaultValue)
Definition TSdlValue.ipp:71
A group of cooked data that represent the visible part of the scene at a specific time....
Definition TransientVisualElement.h:19
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19