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.
This commit is contained in:
Tony Wasserka 2014-04-15 23:35:54 +02:00
parent 12d7ffac13
commit 068f26d2aa

View File

@ -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;