Simple outer glow / light shadow effect for fonts?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By TobiLa

Hi, I want to create the following effect with the text in my game that you get when in illustrator you choose “Effect → Stylize → Outer Glow” and select the mode “multiply”

enter image description here

I think it makes the font stand more out and looks better.
How can I achieve this effect on a font in Godot? Tried using the environment glow/bloom effect but couldn’t get it looking like this. Also searched for shaders, but found nothing like that.

:bust_in_silhouette: Reply From: bloqm

I don’t have a good answer for you, but I have tried something similar in the past and found it impossible.
The way Godot treats text, each letter has a very small, tight bounding box, and the glow effect gets cropped around each letter.

If you manage to get an outline shader working you’ll have a good starting base, since outlines are similar to what you want, except for the soft gradient. Example of outline shader: 2D outline stroke - Godot Shaders
You’ll see that it doesn’t really work with text. Note that Godot has an special “outline” parameter for text; I believe this is a developer’s hack to get around this limitation.

Another approach would be somehow duplicating the text as an image, perhaps rendering it to a viewport texture, modulating and blurring said texture and showing it behind the actual text.