Tone down pixel upscaling, removes artifacts

This commit is contained in:
2025-11-25 22:39:09 +00:00
parent 331d0cce73
commit a613870d77
+5 -5
View File
@@ -8,7 +8,7 @@ vec3 f (float x, float y)
{ return texture(screenTexture, vTexPos + vec2(x/screensize.x,y/screensize.y)).xyz;
}
bool t (vec3 x, vec3 y)
{ return dot(x-y,x-y) < 0.1;
{ return dot(x-y,x-y) < 0.005;
}
bool t3 (vec3 x, vec3 y, vec3 z)
{ return t(x,y) && t(y,z);
@@ -23,13 +23,13 @@ vec3 br = f( 1,-1);
vec3 bb = f( 0,-2);
vec3 bl = f(-1,-1);
vec3 ml = f(-2, 0);
if (t3(tt,tr,mr))
if (t3(tl,tr,br))
{ fColor = vec4(tr,1);}
else if (t3(mr,br,bb))
else if (t3(tr,br,bl))
{ fColor = vec4(br,1);}
else if (t3(bb,bl,ml))
else if (t3(br,bl,tl))
{ fColor = vec4(bl,1);}
else if (t3(ml,tl,tt))
else if (t3(bl,tl,tr))
{ fColor = vec4(tl,1);}
else
//{fColor = texture(screenTexture, vTexPos); }