Emissive material in Defold?

Hello guys,
I have a sprite which I want to have a glowing effect. One way to acheive this will be to edit the sprite in GIMP and add a neon glow. Is there any other way to do inside Defold?
Thanks in advance.

1 Like

Yes, this is possible. Draw the emissive predicate to its own render target, blur it (or whatever you want done to it to make a glowy effect), then draw that on top of your other normal predicates you want the emissive to be above with another render target material that combines them how you want such as with an additive effect.

3 Likes

Thanks for your reply. Have been off for a while, but am back again, and strangely, I am not frightened this time when I hear render targets and all the stuff( the Defold effect maybe? :wink: ).

The problem is, what effects are there to make a glowy effect. I understood the rest completely, but this one intrigues me.

2 Likes

A classic way is (as @pkeod suggested), to use a blur.
To create a blur, a simple way is to apply a blur kernel in two directions (first horizontal, then vertical, in two passes).

Here is one tutorial:

Here are some examples to look at for reference:
https://www.shadertoy.com/results?query=box+blur

3 Likes

Aha!!. It was a very nice tutorial. Thanks a lot for helping me again.

1 Like