From 068f26d2aaadb07a5fc7315cf291c78cfd4d2643 Mon Sep 17 00:00:00 2001 From: Tony Wasserka Date: Tue, 15 Apr 2014 23:35:54 +0200 Subject: [PATCH] PixelShaderGen: Fix an issue with color combiner compare mode and simplify the affected line a bit. This was a mistake of mine when translating floating point values to integer values. Also, the max() part of that line was just completely redundant because the sign of an absolute value is always greater than or equal to zero. Fixes issue 7178. --- Source/Core/VideoCommon/PixelShaderGen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp index 900b63fcb3..5dd8b2841e 100644 --- a/Source/Core/VideoCommon/PixelShaderGen.cpp +++ b/Source/Core/VideoCommon/PixelShaderGen.cpp @@ -782,7 +782,7 @@ static inline void WriteStage(T& out, pixel_shader_uid_data& uid_data, int n, AP "((idot(tevin_a.rgb, comp24) > idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_BGR24_GT "((idot(tevin_a.rgb, comp24) == idot(tevin_b.rgb, comp24)) ? tevin_c.rgb : int3(0,0,0))", // TEVCMP_BGR24_EQ "(max(sign(tevin_a.rgb - tevin_b.rgb), int3(0,0,0)) * tevin_c.rgb)", // TEVCMP_RGB8_GT - "((int3(255,255,255) - max(sign(abs(tevin_a.rgb - tevin_b.rgb)), int3(0,0,0))) * tevin_c.rgb)" // TEVCMP_RGB8_EQ + "((int3(1,1,1) - sign(abs(tevin_a.rgb - tevin_b.rgb))) * tevin_c.rgb)" // TEVCMP_RGB8_EQ }; int mode = (cc.shift<<1)|cc.op;