From 83ff20a8bea9f8c2f66636efbcd4a23a2ce4a268 Mon Sep 17 00:00:00 2001 From: papadanku Date: Sun, 14 May 2023 22:09:20 -0700 Subject: [PATCH] Update cVideoProcessing.fxh --- shaders/shared/cVideoProcessing.fxh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/shaders/shared/cVideoProcessing.fxh b/shaders/shared/cVideoProcessing.fxh index 7241231..d0b80cc 100644 --- a/shaders/shared/cVideoProcessing.fxh +++ b/shaders/shared/cVideoProcessing.fxh @@ -178,11 +178,8 @@ float4 CBlock = SampleBlock(S1, TexData.MainTex.xy + Shift, TexData); float NCC = GetNCC(PBlock, CBlock); - if (NCC > Minimum) - { - Vectors = Shift; - Minimum = NCC; - } + Vectors = (NCC > Minimum) ? Shift : Vectors; + Minimum = max(NCC, Minimum); } return Vectors; }