# HG changeset patch # User Michael Pavone # Date 1499489089 25200 # Node ID 957325c990d5867a550e78c5ee7fc198e4b55ded # Parent 49d3c572b3f2201cf11d7cbcb701378c1d27eae7 Fix texture coordinate offsets in default shader so things look right with really high resolutions and weird multiples of native diff -r 49d3c572b3f2 -r 957325c990d5 shaders/default.f.glsl --- a/shaders/default.f.glsl Fri Jul 07 21:01:45 2017 -0700 +++ b/shaders/default.f.glsl Fri Jul 07 21:44:49 2017 -0700 @@ -6,10 +6,11 @@ void main() { - vec2 modifiedCoord = vec2(texcoord.x, (floor(texcoord.y * 512.0) + 0.5)/512.0); + vec2 modifiedCoord0 = vec2(texcoord.x, (floor(texcoord.y * 512.0 + 0.25) + 0.5)/512.0); + vec2 modifiedCoord1 = vec2(texcoord.x, (floor(texcoord.y * 512.0 - 0.25) + 0.5)/512.0); gl_FragColor = mix( - texture2D(textures[1], modifiedCoord), - texture2D(textures[0], modifiedCoord), + texture2D(textures[1], modifiedCoord1), + texture2D(textures[0], modifiedCoord0), (sin(texcoord.y * 1024.0 * 3.14159265359) + 1.0) * 0.5 ); }