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

Implement per-light Specular property in DirectionalLight3D

This commit is contained in:
Andrew_Shobbrook
2023-08-18 11:59:57 +10:00
committed by Hugo Locurcio
parent 08508d2e01
commit e42def12d0
7 changed files with 9 additions and 6 deletions

View File

@@ -2351,7 +2351,7 @@ void fragment_shader(in SceneData scene_data) {
#else
directional_lights.data[i].color * directional_lights.data[i].energy * tint,
#endif
true, shadow, f0, orms, 1.0, albedo, alpha, screen_uv,
true, shadow, f0, orms, directional_lights.data[i].specular, albedo, alpha, screen_uv,
#ifdef LIGHT_BACKLIGHT_USED
backlight,
#endif

View File

@@ -1647,7 +1647,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, screen_uv,
true, shadow, f0, orms, directional_lights.data[i].specular, albedo, alpha, screen_uv,
#ifdef LIGHT_BACKLIGHT_USED
backlight,
#endif