diff options
author | reduz <reduzio@gmail.com> | 2021-01-24 16:00:20 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2021-01-24 20:17:28 -0300 |
commit | a9beb7aa8c9e81c57ff4c9753c846bf14c5a1620 (patch) | |
tree | a171779287d4244f016863f32b5ec3dd106e8d9d /servers/rendering/renderer_rd/shaders/scene_forward.glsl | |
parent | 6fe342478b7203ca36fdbaa34a31618c5bba42ce (diff) |
Shadow map rendering optimization
-All shadow rendering is done with raster now (no compute)
-All shadow rendering is done by rendering directly to the shadow atlas
-Improved how buffer clearing is done to optimize the above.
-Ability to set shadows as 16 bits.
Diffstat (limited to 'servers/rendering/renderer_rd/shaders/scene_forward.glsl')
-rw-r--r-- | servers/rendering/renderer_rd/shaders/scene_forward.glsl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward.glsl b/servers/rendering/renderer_rd/shaders/scene_forward.glsl index aa32188a26..ea203c8abe 100644 --- a/servers/rendering/renderer_rd/shaders/scene_forward.glsl +++ b/servers/rendering/renderer_rd/shaders/scene_forward.glsl @@ -1282,7 +1282,7 @@ float light_process_spot_shadow(uint idx, vec3 vertex, vec3 normal) { } else { #endif //hard shadow - vec4 shadow_uv = vec4(splane.xy * spot_lights.data[idx].atlas_rect.zw + spot_lights.data[idx].atlas_rect.xy, z_norm, 1.0); + vec4 shadow_uv = vec4(splane.xy * spot_lights.data[idx].atlas_rect.zw + spot_lights.data[idx].atlas_rect.xy, splane.z, 1.0); shadow = sample_pcf_shadow(shadow_atlas, spot_lights.data[idx].soft_shadow_scale * scene_data.shadow_atlas_pixel_size, shadow_uv); #ifdef USE_SOFT_SHADOWS |