Godot Version
V4.2.2 Stable
Question
Hello, I would like to get shadows and light on my sprites with normal maps from both a PointLight2D and a DirectionalLight2D but it fails.
I can manage to have shadows from both light sources, but the sprites are not illuminated by both sources. if the LightOccluder2D cull mode is Clockwise, the sprite will only receive light from the directionalLight2D and if the LightOccluder2D cull mode is CounterClockwise the sprite will only receive light from the PointLight2D.
i made a test scene like this :
The scripts only makes the lights move :
extends Node2D
var directional_light_rotation : float = 0.2
var light_time_passed : float = 0.0
var light_amplitude : float = 600.0
var light_speed : float = 1.0
func _process(delta) -> void:
$DirectionalLight2D.rotation += directional_light_rotation * delta
light_time_passed += delta
var offset : float = light_amplitude * (sin(light_time_passed * light_speed) * 0.5 + 0.5)
$PointLight2D.position.y = offset
Here is the result :
My LightOccluder2D are configured as such (except for the cull mode difference) :
What am i doing wrong ? is this even possible ?