0 votes

Hi, I'm making a screen shader that needs to read the color of each pixel in order to cast the shadow of that pixel depending on its height (each sprite has a heightmap associated).

The problem is that I'm currently reading the SCREEN_TEXTURE so I can't access pixels outside of the screen. This means that sprites slightly outside of the player's field of view don't get their shadow drawn properly.

good

bad

Is there a way I can render pixels a bit outside of the screen to be able to read their color values from my screen shader ?

Godot version 3.2.2
in Engine by (19 points)

Please log in or register to answer this question.

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.