mirror of https://github.com/PCSX2/pcsx2.git
3e12966919
And there is even an explanation. The tfx functions calculate At * Af >> 7, which means modulating by 0x80 should return At as the result. With the evil floating point pixel shader however 0x80 translates to 128/255 (0.502), not exactly 0.5, modulation as At' * Af' * 2 (' means 0 - 1.0 range) is not the same as with integers. At' = Af' = 0.502 At' * Af' * 2 = 0.504 If the alpha test happens to be "not equal to 0x80", then abs(0.504 - 128/255) < 0.5/255 will just miss. Solution is to re-scale those values to the integer range, do the calculations, and then back to float again, but in the end it just simplifies down to At' * Af' * 255/128, doh... At * Af >> 7 => ((At' * 255) * (Af' * 255) / 128) / 255 => At' * Af' * 255/128 At' = Af' = 0.502 0.502 * 0.502 * 255/128 = 0.502 (w00t!) git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1272 96395faa-99c1-11dd-bbfe-3dabce05a288 |
||
---|---|---|
.. | ||
CDVDiso | ||
CDVDisoEFP | ||
CDVDlinuz | ||
CDVDnull | ||
CDVDolio | ||
CDVDpeops | ||
FWnull | ||
GSdx | ||
GSnull | ||
LilyPad | ||
PadNull | ||
PeopsSPU2 | ||
SPU2null | ||
SSSPSXPAD | ||
USBnull | ||
dev9null | ||
spu2-x | ||
xpad | ||
zerogs | ||
zeropad | ||
zerospu2 | ||
build.sh |