From 06c0c64c1ae649625aaa6bffe62612756ee3fc39 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 17 Nov 2018 17:31:32 -0500 Subject: [PATCH] Shifts intermediate buffer sampling into the middle of each pixel row. --- Outputs/OpenGL/ScanTargetGLSLFragments.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp index 80ad6fb95..7cadc4107 100644 --- a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp +++ b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp @@ -74,7 +74,7 @@ std::string ScanTarget::glsl_default_vertex_shader(ShaderType type) { "float lateral = float(gl_VertexID & 1);" "float longitudinal = float((gl_VertexID & 2) >> 1);" - "textureCoordinate = vec2(lateral * processingWidth, lineY) / vec2(1.0, textureSize(textureName, 0).y);" + "textureCoordinate = vec2(lateral * processingWidth, lineY + 0.5) / vec2(1.0, textureSize(textureName, 0).y);" "vec2 centrePoint = mix(startPoint, endPoint, lateral) / scale;" "vec2 height = normalize(endPoint - startPoint).yx * (longitudinal - 0.5) * rowHeight;"