1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +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

@@ -3970,6 +3970,8 @@ void VisualServerRaster::_light_instance_update_pssm_shadow(Instance *p_light,Sc
//float cull_max=p_cull_range.max;
bool overlap = rasterizer->light_instance_get_pssm_shadow_overlap(p_light->light_info->instance);
float cull_min=p_camera->znear;
float cull_max=p_camera->zfar;
float max_dist = rasterizer->light_directional_get_shadow_param(p_light->base_rid,VS::LIGHT_DIRECTIONAL_SHADOW_PARAM_MAX_DISTANCE);
@@ -3999,7 +4001,7 @@ void VisualServerRaster::_light_instance_update_pssm_shadow(Instance *p_light,Sc
camera_matrix.set_orthogonal(
p_camera->size,
viewport_rect.width / (float)viewport_rect.height,
distances[i],
distances[(i==0 || !overlap )?i:i-1],
distances[i+1],
p_camera->vaspect
@@ -4011,7 +4013,7 @@ void VisualServerRaster::_light_instance_update_pssm_shadow(Instance *p_light,Sc
camera_matrix.set_perspective(
p_camera->fov,
viewport_rect.width / (float)viewport_rect.height,
distances[i],
distances[(i==0 || !overlap )?i:i-1],
distances[i+1],
p_camera->vaspect