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:
gnick79
2010-11-23 13:57:01 +00:00
parent b0c94a47f9
commit 4267adbd5e
4 changed files with 29 additions and 14 deletions

View File

@ -201,9 +201,11 @@ void PixelShaderManager::SetConstants()
{
if(!g_ActiveConfig.bDisableFog)
{
float a = bpmem.fog.a.GetA() * ((float)(1 << (bpmem.fog.b_shift - 1)));
float b = ((float)bpmem.fog.b_magnitude / 8388638) * ((float)(1 << (bpmem.fog.b_shift - 1)));
SetPSConstant4f(C_FOG + 1, a, b, bpmem.fog.c_proj_fsel.GetC(), 0);
//downscale magnitude to 0.24 bits
float b = (float)bpmem.fog.b_magnitude / 0xFFFFFF;
float b_shf = (float)(1 << bpmem.fog.b_shift);
SetPSConstant4f(C_FOG + 1, bpmem.fog.a.GetA(), b, bpmem.fog.c_proj_fsel.GetC(), b_shf);
}
else
{