You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a 2d project where I want to render island meshes, with a repeated texture, and a black outline at the edge of the island.
I got the repeated texture to work some time ago, but I have not been able to figure out how to render the black outline at the edge of the island mesh.
After searching on the internet I have found shader examples where alpha value sampling of the surrounding pixels are used:
However as I want to render the outline for a 2d mesh using a repeated texture (see repeated texture setup here) rather than detecting the edges from the transparent pixels within a sprite I suspect that I need some other method for generating the outline. Possibly with several render passes as I have seen done for 3d outline shaders?
Are there any examples of how to do this? I'm learning, but still fairly new to the Bevy render pipeline and shaders.
I have this:
I want a result similar to this (edited in GIMP):
My current 2d mesh builder code in case that is helpful:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a 2d project where I want to render island meshes, with a repeated texture, and a black outline at the edge of the island.
I got the repeated texture to work some time ago, but I have not been able to figure out how to render the black outline at the edge of the island mesh.
After searching on the internet I have found shader examples where alpha value sampling of the surrounding pixels are used:
However as I want to render the outline for a 2d mesh using a repeated texture (see repeated texture setup here) rather than detecting the edges from the transparent pixels within a sprite I suspect that I need some other method for generating the outline. Possibly with several render passes as I have seen done for 3d outline shaders?
Are there any examples of how to do this? I'm learning, but still fairly new to the Bevy render pipeline and shaders.
I have this:

I want a result similar to this (edited in GIMP):

My current 2d mesh builder code in case that is helpful:
Beta Was this translation helpful? Give feedback.
All reactions