1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-02 20:30:00 +00:00

Flips and properly sizes output scans.

This commit is contained in:
Thomas Harte 2018-11-12 18:28:09 -05:00
parent 938d09f34a
commit 0ac62e3805

View File

@ -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: