0 votes


I have 3 Sprites: bg1, bg2, rect (screenshots below).
bg1 contains the colored "tiles" (red, green, blue, magenta), and the bg2 contains the yellow circles.
I want to write a very simple shader, that reads the baground pixels, but only from the bg1 sprite, so I placed a BackBufferCopy node between bg1 and bg2.

Node tree:
enter image description here
Shader code:

shader_type canvas_item;

void fragment() {
    COLOR = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0.0);

I attached this shader to the "rect" sprite, and it works as I expected, but only on GLES3:
enter image description here

Unfortunately it doesnt work on GLES2, in this case the BackBufferCopy seems to be ignored... or something, idk.:
enter image description here

I tried texture and textureLod functions too :(

How can I make it work on GLES2?
Is it possible at all, or not supported?

[Godot 3.2.2 & Win10 64bit]

Thank you!

in Engine by (674 points)

1 Answer

0 votes

I had the same issue! Turns out to be a regression in 3.2.2 when they added batching.

You can disable batching in the project settings if you sorely need BackBufferCopy more than the performance added by batching.

by (14 points)
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 Frequently asked questions and 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.