#Using an outline shader on a tileset?

11 messages · Page 1 of 1 (latest)

broken tide
#

Hi,

I'm trying to use an outline shader to outline the shape of my entire tileset.

I've found this shader online: https://godotshaders.com/shader/2d-outline-inline/
But when using it on a tilemap, it outlines each individual tile, and doesn't do an outline at all if an individual tile has no transparent pixels.

I know this is because the UV property in the shader refers to each individual tile's UV when using a shader, but I have tried modifying this shader using SCREEN_UV to replace UV, and it hasn't worked.

I've done a ton of searches to try and fix this by myself, but I'm pretty new to shaders and I'm having trouble fixing it on my own.

Any help greatly appreciated!

Adds an outer or inner stroke to a texture. Just...

outer ridge
#

if you are using godot 4, you could put it inside CanvasGroup and apply the shader to that, I am pretty sure that's it's intended use.

broken tide
outer ridge
#

then the setup is bit more complicated but you can use viewports

broken tide
outer ridge
#

just texture

#

it works like a sprite

broken tide
#

Ahhhh ok nice! I seee

outer ridge
#

well depends
how you render it

broken tide
#

Yeah

#

I’ll try messing with that later - thanks a lot 🫡🫡