1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-24 15:26:15 +00:00

More 3D Work

-=-=-=-=-=-

-ESM Shadow Mapping for softer and less glitchy shadows
-HDR Pipeline (convert to Linear on texture import, convert to SRGB at the end)
-Fix to xml parse bug
This commit is contained in:
Juan Linietsky
2014-06-16 10:22:26 -03:00
parent 64e83bfd14
commit 703004f830
40 changed files with 1114 additions and 116 deletions

View File

@@ -912,12 +912,6 @@ float BakedLightBaker::_throw_ray(int p_light_index,const Vector3& p_begin, cons
Color diffuse_at_point(0.8,0.8,0.8);
Color specular_at_point(0.0,0.0,0.0);
if (triangle->material) {
//triangle->get_uv(r_point);
diffuse_at_point=triangle->material->diffuse.get_color(uv);
specular_at_point=triangle->material->specular.get_color(uv);
}
float dist = p_begin.distance_to(r_point);
@@ -963,6 +957,14 @@ float BakedLightBaker::_throw_ray(int p_light_index,const Vector3& p_begin, cons
if (triangle->material) {
//triangle->get_uv(r_point);
diffuse_at_point=triangle->material->diffuse.get_color(uv);
specular_at_point=triangle->material->specular.get_color(uv);
}
diffuse_at_point.r=res_light.r*diffuse_at_point.r;
diffuse_at_point.g=res_light.g*diffuse_at_point.g;

View File

@@ -111,7 +111,7 @@ void BakedLightEditor::_notification(int p_option) {
ERR_FAIL_COND(node->get_baked_light().is_null());
baker->update_octree_image(octree_texture);
#if 0
#if 1
//debug
Image img(baker->baked_octree_texture_w,baker->baked_octree_texture_h,0,Image::FORMAT_RGBA,octree_texture);
Ref<ImageTexture> it = memnew( ImageTexture );