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

Allow SCREEN_UV to be used in light function of spatial shader

This commit is contained in:
Chaosus
2024-07-31 18:33:16 +03:00
parent fd4c29a189
commit a64b3fd3f8
7 changed files with 26 additions and 23 deletions

View File

@@ -1591,7 +1591,7 @@ void main() {
light_compute(normal, directional_lights.data[i].direction, view, size_A,
directional_lights.data[i].color * directional_lights.data[i].energy * tint,
true, shadow, f0, orms, 1.0, albedo, alpha,
true, shadow, f0, orms, 1.0, albedo, alpha, screen_uv,
#ifdef LIGHT_BACKLIGHT_USED
backlight,
#endif
@@ -1628,7 +1628,7 @@ void main() {
shadow = blur_shadow(shadow);
// Fragment lighting
light_process_omni(light_index, vertex, view, normal, vertex_ddx, vertex_ddy, f0, orms, shadow, albedo, alpha,
light_process_omni(light_index, vertex, view, normal, vertex_ddx, vertex_ddy, f0, orms, shadow, albedo, alpha, screen_uv,
#ifdef LIGHT_BACKLIGHT_USED
backlight,
#endif
@@ -1661,7 +1661,7 @@ void main() {
shadow = blur_shadow(shadow);
light_process_spot(light_index, vertex, view, normal, vertex_ddx, vertex_ddy, f0, orms, shadow, albedo, alpha,
light_process_spot(light_index, vertex, view, normal, vertex_ddx, vertex_ddy, f0, orms, shadow, albedo, alpha, screen_uv,
#ifdef LIGHT_BACKLIGHT_USED
backlight,
#endif