Odd shader banding while executing but not in editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By AFE-GmdG

I got some odd color banding behavior if i run my scene. This isn’t the case in the editor itself or if i use the “Game Camera Override” button:

Does anyone have a clue?

  • I use a World Environment with Tonemapping, SS Reflections SSAO and some Color adjustments.
  • The floor shader is a simple calculation:
shader_type spatial;
render_mode blend_mix, depth_draw_opaque, cull_back, diffuse_burley, specular_schlick_ggx;

varying vec3 pos;
varying vec3 normal;

void vertex() {
    pos = (WORLD_MATRIX * vec4(VERTEX, 1)).xyz;
    normal = NORMAL;
}

void fragment() {
    float faceUp = max(0.0, min(1.0, normal.y));
    vec2 uv = fract(pos.xz) - 0.5;
    float l = length(max(abs(uv) - 0.4, 0.0));
    float borderMask = smoothstep(0.08, 0.09, l);

    ALBEDO = mix(vec3(0.0), vec3(borderMask), faceUp);
    METALLIC = 0.0;
    SPECULAR = 0.5;
    ROUGHNESS = mix(1.0 - faceUp * 0.9, borderMask * 0.9, borderMask);
}