浏览代码

Fix spotlight's shadow with volumetric fog

Florent Guiocheau 2 月之前
父节点
当前提交
199161f023
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl

+ 1 - 1
servers/rendering/renderer_rd/shaders/environment/volumetric_fog_process.glsl

@@ -559,7 +559,7 @@ void main() {
 							vec4 v = vec4(view_pos, 1.0);
 							vec4 v = vec4(view_pos, 1.0);
 
 
 							vec4 splane = (spot_lights.data[light_index].shadow_matrix * v);
 							vec4 splane = (spot_lights.data[light_index].shadow_matrix * v);
-							splane.z -= spot_lights.data[light_index].shadow_bias / (d * spot_lights.data[light_index].inv_radius);
+							splane.z -= spot_lights.data[light_index].shadow_bias;
 							splane /= splane.w;
 							splane /= splane.w;
 
 
 							vec3 pos = vec3(splane.xy * spot_lights.data[light_index].atlas_rect.zw + spot_lights.data[light_index].atlas_rect.xy, splane.z);
 							vec3 pos = vec3(splane.xy * spot_lights.data[light_index].atlas_rect.zw + spot_lights.data[light_index].atlas_rect.xy, splane.z);