mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -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:
@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user