From 13596d099882d9654a4bc91123d6e3b7f8cf6800 Mon Sep 17 00:00:00 2001 From: AUnicornWithNoLife Date: Fri, 3 Feb 2023 09:24:56 +0000 Subject: [PATCH] square --- Program.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Program.cs b/Program.cs index daa5b78..4ab71ae 100644 --- a/Program.cs +++ b/Program.cs @@ -125,8 +125,8 @@ namespace Cupola float3 i1 = input1[ThreadIds.XY].RGB; float3 i2 = input2[ThreadIds.XY].RGB; - float i1Intensity = i1.X * i1.Y * i1.Z; - float i2Intensity = i2.X * i2.Y * i2.Z; + float i1Intensity = (i1.X * i1.X) + (i1.Y * i1.Y) + (i1.Z * i1.Z); + float i2Intensity = (i2.X * i2.X) + (i2.Y * i2.Y) + (i2.Z * i2.Z); if (i1Intensity > i2Intensity) {