1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

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)
This commit is contained in:
Juan Linietsky
2014-06-17 11:58:35 -03:00
parent 155028612b
commit ddc0e7fd3b
15 changed files with 517 additions and 11 deletions

View File

@@ -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++) {