mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-24 23:11:14 +01:00
Small update to fix some cmpr alpha issues with games that use linear filtering. Apparently the colour values matter even though alpha = 0.
Also, remove redundant ANDs. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5787 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
5abc698000
commit
434e6b1198
@ -279,10 +279,11 @@ kernel void decodeCMPRBlock(global uchar *dst,
|
||||
bitselect(colorb565, colorb565 >> (uchar2)5, (uchar2)7),
|
||||
(uchar2)0xFF);
|
||||
|
||||
ushort4 frac2 = convert_ushort4(color32.even & (uchar4)0xFF) - convert_ushort4(color32.odd & (uchar4)0xFF);
|
||||
ushort4 frac2 = convert_ushort4(color32.even) - convert_ushort4(color32.odd);
|
||||
uchar4 frac = convert_uchar4((frac2 * (ushort4)3) / (ushort4)8);
|
||||
|
||||
ushort4 colorAlpha = upsample((uchar4)0, rhadd(color32.odd, color32.even));
|
||||
ushort4 colorAlpha = upsample((uchar4)(color32.even.s0,color32.even.s1,color32.even.s2,0),
|
||||
rhadd(color32.odd, color32.even));
|
||||
colorAlpha.s3 = 0xFF;
|
||||
ushort4 colorNoAlpha = upsample(color32.odd + frac, color32.even - frac);
|
||||
|
||||
@ -324,10 +325,11 @@ kernel void decodeCMPRBlock_RGBA(global uchar *dst,
|
||||
bitselect(colora565 << (uchar2)3, colora565 >> (uchar2)2, (uchar2)7),
|
||||
(uchar2)0xFF);
|
||||
|
||||
ushort4 frac2 = convert_ushort4(color32.even & (uchar4)0xFF) - convert_ushort4(color32.odd & (uchar4)0xFF);
|
||||
ushort4 frac2 = convert_ushort4(color32.even) - convert_ushort4(color32.odd);
|
||||
uchar4 frac = convert_uchar4((frac2 * (ushort4)3) / (ushort4)8);
|
||||
|
||||
ushort4 colorAlpha = upsample((uchar4)0, rhadd(color32.odd, color32.even));
|
||||
ushort4 colorAlpha = upsample((uchar4)(color32.even.s0,color32.even.s1,color32.even.s2,0),
|
||||
rhadd(color32.odd, color32.even));
|
||||
colorAlpha.s3 = 0xFF;
|
||||
ushort4 colorNoAlpha = upsample(color32.odd + frac, color32.even - frac);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user