0 votes

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?

Godot version latest - stable
in Engine by (22 points)

Can you please be more specific?

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.

1 Answer

0 votes

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: https://youtu.be/ctevHwoRl24 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: https://youtu.be/ImLBM-NgnJY

by (99 points)
edited by
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.