diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-06-17 11:58:35 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-06-17 11:58:35 -0300 |
commit | ddc0e7fd3bc00afa33432ed594038dbb80c7fea3 (patch) | |
tree | 5fa809fa7b32808837e28aeb90cb53aef1222d7e /tools/editor | |
parent | 155028612bfe26c7c8460f6acc28de6d385a3625 (diff) |
FineTune HDR and Other Stuff
-=-=-=-=-=-=-=-=-=-=-=-=-=-
-More parameters to ESM shadows
-LightMap Octree now can bake to "hdr" (use HDR8 for now)
-New resource PolygonPathFinder, polygon based pathfinder using A-star algorithm. (will add nodes to use it more easily soon)
Diffstat (limited to 'tools/editor')
-rw-r--r-- | tools/editor/plugins/baked_light_baker.cpp | 6 | ||||
-rw-r--r-- | tools/editor/plugins/baked_light_editor_plugin.cpp | 2 |
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)); |