0 votes


I have been struggling with misbehaving shader with GLES2 renderer (works well with GLES3 and apparently in editor even with GLES2). I've narrowed it down to SCREEN_TEXTURE contents not getting updated consistently. It appears to be somehow dependent on camera position.

Here's the scene with shader stripped down to nothing but copying from SCREEN_TEXTURE:


Here's the shader on that sphere:

shader_type spatial;
render_mode blend_mix,depth_draw_opaque,cull_back,unshaded;
uniform vec4 albedo : hint_color;

void vertex() {

void fragment() {
    ALBEDO = textureLod(SCREEN_TEXTURE, SCREEN_UV, 0).rgb;

I've been trying to set up a minimal scene, but can't reproduce the problem there. I've also tried to disable/remove stuff from the main project, but so far haven't found the cause.

Any ideas what might be causing this? Or tips on how to debug further?

asked Jun 18 in Engine by fractile (53 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.