Attention | Topic was automatically imported from the old Question2Answer platform. | |
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:
- No odd behavior in the editor:
Imgur: The magic of the Internet - Odd behavior while running (approx same camera angle)
Imgur: The magic of the Internet
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);
}