diff options
Diffstat (limited to 'scene/3d/light.h')
-rw-r--r-- | scene/3d/light.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/scene/3d/light.h b/scene/3d/light.h index 2f3ac8a5e7..7ba25731d9 100644 --- a/scene/3d/light.h +++ b/scene/3d/light.h @@ -46,6 +46,7 @@ class Light : public VisualInstance { public: enum Param { PARAM_ENERGY = VS::LIGHT_PARAM_ENERGY, + PARAM_INDIRECT_ENERGY = VS::LIGHT_PARAM_INDIRECT_ENERGY, PARAM_SPECULAR = VS::LIGHT_PARAM_SPECULAR, PARAM_RANGE = VS::LIGHT_PARAM_RANGE, PARAM_ATTENUATION = VS::LIGHT_PARAM_ATTENUATION, @@ -62,6 +63,12 @@ public: PARAM_MAX = VS::LIGHT_PARAM_MAX }; + enum BakeMode { + BAKE_DISABLED, + BAKE_INDIRECT, + BAKE_ALL + }; + private: Color color; float param[PARAM_MAX]; @@ -73,6 +80,7 @@ private: VS::LightType type; bool editor_only; void _update_visibility(); + BakeMode bake_mode; // bind helpers @@ -113,7 +121,10 @@ public: void set_shadow_reverse_cull_face(bool p_enable); bool get_shadow_reverse_cull_face() const; - virtual Rect3 get_aabb() const; + void set_bake_mode(BakeMode p_mode); + BakeMode get_bake_mode() const; + + virtual AABB get_aabb() const; virtual PoolVector<Face3> get_faces(uint32_t p_usage_flags) const; Light(); @@ -121,6 +132,7 @@ public: }; VARIANT_ENUM_CAST(Light::Param); +VARIANT_ENUM_CAST(Light::BakeMode); class DirectionalLight : public Light { @@ -207,8 +219,8 @@ protected: static void _bind_methods(); public: - SpotLight() - : Light(VisualServer::LIGHT_SPOT) {} + SpotLight() : + Light(VisualServer::LIGHT_SPOT) {} }; #endif |