0 votes

Hi,

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:

https://gfycat.com/frayedsoggyasianconstablebutterfly

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() {
    UV=UV;
}

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?

in Engine by (71 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.