Need help with shaders.

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

I am trying to add shadows or we can say offset copy of drawn texture.
Is it possible to do with tilemaps and shaders?

Is this possible with shaders?

Can you please be more specific?

David000 | 2022-04-15 19:31

I was easily able to achieve this effect in pygame by getting the drawn texture and converting visible pixels to shadow color and then draw it by offsetting some pixels before actual texture. Can i get a similar effect in godot engine using shaders?

I personally think this is possible with canvas layers but I am not sure.
Also shaders docs are bit confusing.

I am talking about this.

WiperR | 2022-04-16 03:57

:bust_in_silhouette: Reply From: David000

I rarely done shaders but my guess is that its possible. Canvas layers are for ui im pretty sure.

I also found this tutorial on youtube: but I only just skimmed through it. I heard something about a godot demo shaders website at the end of the video which might help you out.

If you just can’t figure out out , ask on Reddit, godot discord, and other forums for godot.

For last resort, u could make a tilemap with the shadows and just place them wherever you need. But that will be a very tedious process most likely.

Lastly, watch many shader tutorials and if u have already, watch them again. Get everything into the big brain of yours and dont forget, theres always an answer.

P.S if theres something else, ill edit my answer and stick it into here if i dont forget ofc.

I found another tutorial: