godot-shader-tutorials
godot-shader-tutorials copied to clipboard
Outline shader: sprite.flip_h support
Hi,
outline.shader
is amazing! Thanks so much for all your work. I'm writing here with the hope that you could help me troubleshoot and throw ideas how to make this shader work when sprite.flip_h
is set to true.
What currently happens is nicely described in https://www.reddit.com/r/godot/comments/rxdbuc/bug_shader_material_applied_to_animatedsprite/
I've tried doing the division here as described:
VERTEX += uv / float(intensity);
Flipping the sprite using sprite.flip_h = true
works, but then the outline is not added outside of the sprite (and generally looks weird):
Is there a way to fiddle around with this shader to make it work with sprite.flip_h
while still being able to have the outline outside of the sprite frame?
Any help will be very much appreciated!