Open
Description
Godot version
4.0.beta9 (e780dc332) using any renderer
System information
Windows 11
Issue description
It seems like CanvasItem shaders are always receiving vec4(0.0)
as their LIGHT
input. Based on the docs, I would expect to get the value of the light that would be otherwise applied to the texture.
Steps to reproduce
- Create a Sprite2D that is affected by a Light2D (point or directional)
- Attach a ShaderMaterial with a canvas_item shader to the Sprite2D.
- Try writing a
light()
function:- If you don't set
LIGHT
, no lights are applied to the sprite at all (according to the docs, not settingLIGHT
should cause the function to be a no-op) - If you set
LIGHT = LIGHT;
, no lights are applied (I would expect this to be a no-op)
- If you don't set
Some extra info:
- the light's blend mode has no effect (same result with add/mix/sub)
- Setting a
LIGHT
value (e.g.LIGHT = COLOR;
) seems to work fine - I didn't expect this have any effect, but adding a
BackBufferCopy
node before the sprite didn't change anything