mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-23 03:32:32 +00:00
Corrects composition colour phase.
This commit is contained in:
parent
4e21d24b5f
commit
7c23c32e44
@ -174,7 +174,11 @@ 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.0f;
|
||||
result.colourPhase = 3.141592654f * mix(
|
||||
float(scans[instanceID].endPoints[0].compositeAngle),
|
||||
float(scans[instanceID].endPoints[1].compositeAngle),
|
||||
float(vertexID)
|
||||
) / 32.0;
|
||||
result.colourAmplitude = float(scans[instanceID].compositeAmplitude) / 255.0f;
|
||||
|
||||
// Map position into eye space, allowing for target texture dimensions.
|
||||
|
Loading…
Reference in New Issue
Block a user