From 7c23c32e4401ddc3bcf899c670a9637348188f86 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Thu, 20 Aug 2020 20:45:45 -0400 Subject: [PATCH] Corrects composition colour phase. --- OSBindings/Mac/Clock Signal/ScanTarget/ScanTarget.metal | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock Signal/ScanTarget/ScanTarget.metal b/OSBindings/Mac/Clock Signal/ScanTarget/ScanTarget.metal index 2cc6d10fa..3e0ed2cd5 100644 --- a/OSBindings/Mac/Clock Signal/ScanTarget/ScanTarget.metal +++ b/OSBindings/Mac/Clock Signal/ScanTarget/ScanTarget.metal @@ -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.