Adapting 2D outline shader to TextureProgress

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

I found this shader and added it to my TextureProgress node, unfortunately I don’t know much about shaders and don’t know how to debug here.

The two issues are that I only want the shader to run on the under texture, you can see there is some alpha in the middle of the image due to inner-alpha of the progress texture. I would prefer to fix this in the node/shader instead of just removing the alpha section.

The other issue is parts of the shader are clipped off. I suppose that it is extending outside the bounds of the parent node and thus isn’t shown, how can I fix that?

enter image description here

:bust_in_silhouette: Reply From: jarlowrey

Not sure the easiest way, but one way is to use a vertex shader to expand the sprite a little bit, then fill in the expanded room with the outline (as was done with this better outline shader). Not sure how to fix the inner-alpha problem.