-
-
Notifications
You must be signed in to change notification settings - Fork 23.6k
Description
Tested versions
- Reproductible in: 4.3.stable
System information
Windows 10 - Godot 4.3.stable - Vulkan (Forward+)
Issue description
I was trying to cast a light on a Sprite2D that had a LightOccluder2D attached, without actually occluding the sprite itself. In the documentation it is specified that
LightOccluder2Ds follows the usual 2D drawing order. This is important for 2D lighting, as this is how you control whether the occluder should occlude the sprite itself or not.
This led me to believe that this functionality would work both in the editor and in game.
When trying this out, in editor I got:
While testing the game I got:
I managed to reach a solution by applying a clockwise cull mode, but that rids me of the flexibility that the occluder ordering relative to the sprite would have given me.
I had initially thought that this is a documentation issue, as I specified in the godot-docs repo, but @AThousandShips considered that this is likely an engine issue.
Steps to reproduce
- Create a Sprite2D.
- Click on the Sprite2D, create a LightOccluder2D sibling.
- Create a PointLight2D which can have a texture or a simple radial black and white GradientTexture2D
- In the scene tree, change the placement of the occluder to be above, below the sprite or a child that either has or doesn't have 'show behind parent' enabled.
- No matter which combination was selected, the sprite will always be occluded by the occluder.

