summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/plugins/baked_light_baker.cpp6
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.cpp2
2 files changed, 8 insertions, 0 deletions
diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp
index 36948673a8..1fa4d8d06c 100644
--- a/tools/editor/plugins/baked_light_baker.cpp
+++ b/tools/editor/plugins/baked_light_baker.cpp
@@ -1498,11 +1498,16 @@ void BakedLightBaker::update_octree_image(DVector<uint8_t> &p_image) {
w[i+3]=0xFF;
}
+ float multiplier=1.0;
+
+ if (baked_light->get_format()==BakedLight::FORMAT_HDR8)
+ multiplier=8;
encode_uint32(baked_octree_texture_w,&w[0]);
encode_uint32(baked_octree_texture_h,&w[4]);
encode_uint32(0,&w[8]);
encode_float(1<<lattice_size,&w[12]);
encode_uint32(octree_depth-lattice_size,&w[16]);
+ encode_uint32(multiplier,&w[20]);
encode_float(octree_aabb.pos.x,&w[32]);
encode_float(octree_aabb.pos.y,&w[36]);
@@ -1538,6 +1543,7 @@ void BakedLightBaker::update_octree_image(DVector<uint8_t> &p_image) {
const double *normptr=norm_arr.ptr();
int lz=lights.size();
+ mult/=multiplier;
for(int i=0;i<octant_count;i++) {
diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp
index 71f9671fd9..a1383f22fe 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.cpp
+++ b/tools/editor/plugins/baked_light_editor_plugin.cpp
@@ -125,6 +125,8 @@ void BakedLightEditor::_notification(int p_option) {
print_line("MSUPDATE: "+itos(OS::get_singleton()->get_ticks_msec()-t));
t=OS::get_singleton()->get_ticks_msec();
node->get_baked_light()->set_octree(octree_texture);
+ node->get_baked_light()->set_edited(true);
+
print_line("MSSET: "+itos(OS::get_singleton()->get_ticks_msec()-t));