mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Related FOG changes:
* revert back to proper upscale mantissa of parameters A and C * properly downscale magnitude to 0.24 bits instead than ≡0.23 * Z Eyespace conversion for projection by original patent concept git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6463 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -650,7 +650,7 @@ union FogParam0
|
||||
|
||||
float GetA() {
|
||||
union { u32 i; float f; } dummy;
|
||||
dummy.i = ((u32)sign<<31)|((u32)exponent<<23)|((u32)mantissa * 0x7FFFFF / 0x7FF); // scale mantissa from 11 to 23 bits
|
||||
dummy.i = ((u32)sign << 31) | ((u32)exponent << 23) | ((u32)mantissa << 12); // scale mantissa from 11 to 23 bits
|
||||
return dummy.f;
|
||||
}
|
||||
|
||||
@ -671,7 +671,7 @@ union FogParam3
|
||||
// amount to subtract from eyespacez after range adjustment
|
||||
float GetC() {
|
||||
union { u32 i; float f; } dummy;
|
||||
dummy.i = ((u32)c_sign << 31) | ((u32)c_exp << 23) | ((u32)c_mant * 0x7FFFFF / 0x7FF); // scale mantissa from 11 to 23 bits
|
||||
dummy.i = ((u32)c_sign << 31) | ((u32)c_exp << 23) | ((u32)c_mant << 12); // scale mantissa from 11 to 23 bits
|
||||
return dummy.f;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user