1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-11-23 03:32:32 +00:00

Corrects composition colour amplitude.

This commit is contained in:
Thomas Harte 2020-08-20 20:34:37 -04:00
parent ad6fb85fda
commit 4e21d24b5f

View File

@ -174,8 +174,8 @@ vertex SourceInterpolator scanToComposition( constant Uniforms &uniforms [[buffe
result.position.zw = float2(0.0, 1.0);
result.textureCoordinates.x = mix(scans[instanceID].endPoints[0].dataOffset, scans[instanceID].endPoints[1].dataOffset, float(vertexID));
result.textureCoordinates.y = scans[instanceID].dataY;
result.colourPhase = mix(scans[instanceID].endPoints[0].compositeAngle, scans[instanceID].endPoints[1].compositeAngle, float(vertexID)) / 32.0;
result.colourAmplitude = scans[instanceID].compositeAmplitude;
result.colourPhase = mix(scans[instanceID].endPoints[0].compositeAngle, scans[instanceID].endPoints[1].compositeAngle, float(vertexID)) / 32.0f;
result.colourAmplitude = float(scans[instanceID].compositeAmplitude) / 255.0f;
// Map position into eye space, allowing for target texture dimensions.
// TODO: is this really necessary? Is there nothing like coord::pixel that applies here?