# HG changeset patch # User Michael Pavone # Date 1497740167 25200 # Node ID ee19270495e8dff8aa75402bbc7f37a14ed29ecc # Parent f9fbd0d16df2c4f508e4fb98f8de268e93ca05ed Force texture y-coordinate to middle of line in default shader. Substantially improves picture when linear texture filtering is used diff -r f9fbd0d16df2 -r ee19270495e8 shaders/default.f.glsl --- a/shaders/default.f.glsl Sat Jun 17 15:43:44 2017 -0700 +++ b/shaders/default.f.glsl Sat Jun 17 15:56:07 2017 -0700 @@ -6,9 +6,10 @@ void main() { + vec2 modifiedCoord = vec2(texcoord.x, (floor(texcoord.y * 512.0) + 0.5)/512.0); gl_FragColor = mix( - texture2D(textures[0], texcoord), - texture2D(textures[1], vec2(texcoord.x, texcoord.y - 0.5/1024.0)), + texture2D(textures[0], modifiedCoord), + texture2D(textures[1], modifiedCoord), (sin((texcoord.y * 1024.0 + 1.0)* 3.14159265359) + 1.0) * 0.5 ); }