mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Small update for disabled Fog for older hardware that fails to divide by zero in shaders
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7612 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
bc416a552e
commit
693f276a68
@ -232,9 +232,8 @@ void PixelShaderManager::SetConstants()
|
||||
SetPSConstant4f(C_FOG + 1, bpmem.fog.a.GetA(), b, bpmem.fog.c_proj_fsel.GetC(), b_shf);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetPSConstant4f(C_FOG + 1, 0.0, 1.0, 0.0, 1.0);
|
||||
}
|
||||
|
||||
s_bFogParamChanged = false;
|
||||
}
|
||||
|
||||
@ -254,6 +253,9 @@ void PixelShaderManager::SetConstants()
|
||||
// so to simplify i use the hi coeficient as K in the shader taking 256 as the scale
|
||||
SetPSConstant4f(C_FOG + 2, ScreenSpaceCenter, (float)Renderer::EFBToScaledX((int)(2.0f * xfregs.viewport.wd)), bpmem.fogRange.K[4].HI / 256.0f,0.0f);
|
||||
}
|
||||
else
|
||||
SetPSConstant4f(C_FOG + 2, 0.0f, 1.0f, 1.0f, 0.0f); // Need to update these values for older hardware that fails to divide by zero in shaders.
|
||||
|
||||
s_bFogRangeAdjustChanged = false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user