How to create a text that is not affected by light sources

Godot Version

4.5

Question

Мy 2D scene contains directional light, for which `Blend mode = Substrate` is specified (simulates the dark time). I want to add an interface element (label) linked to a game object. For example, this is a text that displays the amount of health of a mob. When I add text, I see that DirectionalLight2D affects it and it appears darker.

I expect that DirectionalLight2D will not affect the node if you set the Light mask parameter for the target node to a value that is different from the Item Cull Mask parameter of DirectionalLight2D. But when I do that, it doesn’t work.

1 Like

The easiest way I can think of to do this is to add a material to your instance, and set the “Light Mode” in the CanvasItemMaterial to be “Unshaded”

1 Like