#2d outline shader outside of sprite

8 messages · Page 1 of 1 (latest)

upbeat tide
#

I am a total newbie when it comes to shaders. I want to implement an outline on my 2d sprites which are low resolution pixel art. I believe many people already built such a thing, so is there a place to find (wgsl) shaders made by others ? Or should I code this myself ?

upbeat tide
#

2d outline shader outside of sprite

#

I now have a working outline shader, but my issue is that the shader cannot draw outisde the sprite image, what is the best way of workarounding this ?

upbeat tide
#

when creating the Mesh, I inflate the mesh size by the number of pixels the outline should take, and then I had to adapt the outline shader to account for the extra padding. I'm not a big fa of my solution, but it works

hollow slate
#

@upbeat tide Hi do you still have the code for this outline?