summaryrefslogtreecommitdiff
path: root/scene/resources/baked_light.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/baked_light.cpp')
-rw-r--r--scene/resources/baked_light.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/scene/resources/baked_light.cpp b/scene/resources/baked_light.cpp
index 31282a0274..aa4aae03cb 100644
--- a/scene/resources/baked_light.cpp
+++ b/scene/resources/baked_light.cpp
@@ -256,6 +256,38 @@ float BakedLight::get_ao_strength() const {
return ao_strength;
}
+void BakedLight::set_realtime_color_enabled(const bool p_realtime_color_enabled) {
+
+ VS::get_singleton()->baked_light_set_realtime_color_enabled(baked_light, p_realtime_color_enabled);
+}
+
+bool BakedLight::get_realtime_color_enabled() const {
+
+ return VS::get_singleton()->baked_light_get_realtime_color_enabled(baked_light);
+}
+
+
+void BakedLight::set_realtime_color(const Color &p_realtime_color) {
+
+ VS::get_singleton()->baked_light_set_realtime_color(baked_light, p_realtime_color);
+}
+
+Color BakedLight::get_realtime_color() const {
+
+ return VS::get_singleton()->baked_light_get_realtime_color(baked_light);
+}
+
+void BakedLight::set_realtime_energy(const float p_realtime_energy) {
+
+ VS::get_singleton()->baked_light_set_realtime_energy(baked_light, p_realtime_energy);
+}
+
+float BakedLight::get_realtime_energy() const {
+
+ return VS::get_singleton()->baked_light_get_realtime_energy(baked_light);
+}
+
+
void BakedLight::set_energy_multiplier(float p_multiplier){
@@ -434,6 +466,15 @@ void BakedLight::_bind_methods(){
ObjectTypeDB::bind_method(_MD("set_ao_strength","ao_strength"),&BakedLight::set_ao_strength);
ObjectTypeDB::bind_method(_MD("get_ao_strength"),&BakedLight::get_ao_strength);
+ ObjectTypeDB::bind_method(_MD("set_realtime_color_enabled", "enabled"), &BakedLight::set_realtime_color_enabled);
+ ObjectTypeDB::bind_method(_MD("get_realtime_color_enabled"), &BakedLight::get_realtime_color_enabled);
+
+ ObjectTypeDB::bind_method(_MD("set_realtime_color", "tint"), &BakedLight::set_realtime_color);
+ ObjectTypeDB::bind_method(_MD("get_realtime_color"), &BakedLight::get_realtime_color);
+
+ ObjectTypeDB::bind_method(_MD("set_realtime_energy", "energy"), &BakedLight::set_realtime_energy);
+ ObjectTypeDB::bind_method(_MD("get_realtime_energy"), &BakedLight::get_realtime_energy);
+
ObjectTypeDB::bind_method(_MD("set_format","format"),&BakedLight::set_format);
ObjectTypeDB::bind_method(_MD("get_format"),&BakedLight::get_format);
@@ -480,6 +521,11 @@ void BakedLight::_bind_methods(){
ADD_PROPERTY( PropertyInfo(Variant::REAL,"advanced/ao_radius",PROPERTY_HINT_RANGE,"0.0,16.0,0.01"),_SCS("set_ao_radius"),_SCS("get_ao_radius"));
ADD_PROPERTY( PropertyInfo(Variant::REAL,"advanced/ao_strength",PROPERTY_HINT_RANGE,"0.0,1.0,0.01"),_SCS("set_ao_strength"),_SCS("get_ao_strength"));
+ ADD_PROPERTY(PropertyInfo(Variant::BOOL, "realtime/enabled"), _SCS("set_realtime_color_enabled"), _SCS("get_realtime_color_enabled"));
+ ADD_PROPERTY(PropertyInfo(Variant::COLOR, "realtime/color", PROPERTY_HINT_COLOR_NO_ALPHA), _SCS("set_realtime_color"), _SCS("get_realtime_color"));
+ ADD_PROPERTY(PropertyInfo(Variant::REAL, "realtime/energy", PROPERTY_HINT_RANGE, "0.01,4096.0,0.01"), _SCS("set_realtime_energy"), _SCS("get_realtime_energy"));
+
+
BIND_CONSTANT( MODE_OCTREE );
BIND_CONSTANT( MODE_LIGHTMAPS );