From 0ac62e3805e59d4a3e1f8974c9488adc637c71b8 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 12 Nov 2018 18:28:09 -0500 Subject: [PATCH] Flips and properly sizes output scans. --- Outputs/OpenGL/ScanTargetGLSLFragments.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp index 5a04e525c..cc30f8c1d 100644 --- a/Outputs/OpenGL/ScanTargetGLSLFragments.cpp +++ b/Outputs/OpenGL/ScanTargetGLSLFragments.cpp @@ -38,7 +38,8 @@ std::string ScanTarget::globals(ShaderType type) { "vec2 centrePoint = mix(startPoint, endPoint, lateral) / scale;" "vec2 height = normalize(endPoint - startPoint).yx * (longitudinal - 0.5) * rowHeight;" - "gl_Position = vec4(centrePoint + height, 0.0, 1.0);" + "vec2 eyePosition = vec2(1.0) - 2.0 * (centrePoint + height);" + "gl_Position = vec4(eyePosition, 0.0, 1.0);" "}"; case ShaderType::Line: