1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-12-27 16:31:31 +00:00

Fixed: this now implements 12-byte instancing for output runs.

This commit is contained in:
Thomas Harte 2016-05-10 07:30:12 -04:00
parent 86dab3a5d6
commit b0f0315f12
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ namespace CRT {
// or is one of the intermediate buffers that we've used to convert from composite towards RGB.
const GLsizei OutputVertexOffsetOfPosition = 0;
const GLsizei OutputVertexOffsetOfTexCoord = 4;
const GLsizei OutputVertexOffsetOfTerminators = 6;
const GLsizei OutputVertexOffsetOfTerminators = 8;
const GLsizei OutputVertexSize = 12;

View File

@ -51,12 +51,12 @@ std::unique_ptr<OutputShader> OutputShader::make_shader(const char *fragment_met
"lateralVarying = lateral - 0.5;"
"vec2 vSrcCoordinates = mix(srcCoordinates, vec2(terminators.y, srcCoordinates.y), longitudinal);"
"vec2 vSrcCoordinates = vec2(mix(srcCoordinates.x, terminators.y, longitudinal), srcCoordinates.y);"
"ivec2 textureSize = textureSize(texID, 0);"
"iSrcCoordinatesVarying = vSrcCoordinates;"
"srcCoordinatesVarying = vec2(vSrcCoordinates.x / textureSize.x, (vSrcCoordinates.y + 0.5) / textureSize.y);"
"vec2 vPosition = mix(position, vec2(terminators.x, position.y), longitudinal);"
"vec2 vPosition = vec2(mix(position.x, terminators.x, longitudinal), position.y);"
"vec2 floatingPosition = (vPosition / positionConversion) + lateral * scanNormal;"
"vec2 mappedPosition = (floatingPosition - boundsOrigin) / boundsSize;"
"gl_Position = vec4(mappedPosition.x * 2.0 - 1.0, 1.0 - mappedPosition.y * 2.0, 0.0, 1.0);"