diff options
| author | Matthew Parlane <parlane@gmail.com> | 2013-04-11 19:55:36 +1200 |
|---|---|---|
| committer | Matthew Parlane <parlane@gmail.com> | 2013-04-11 19:55:36 +1200 |
| commit | 0c9d8d34e1307433e27435c7d2f84557fd563752 (patch) | |
| tree | 70bc214fe520abc14e64d1a78cafffe178ae239c /Source/Core/VideoCommon/Src/PixelShaderManager.cpp | |
| parent | 7784fa4c67cc8d2545f45694d83805e7e89cd583 (diff) | |
| parent | 3c87512180decf6b0aae9402a2179c73674ef5d8 (diff) | |
Merge branch 'master' into wii-network
Conflicts:
Source/Core/Core/CMakeLists.txt
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderManager.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/PixelShaderManager.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp index ad84f6876e..265bebf991 100644 --- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp +++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp @@ -245,14 +245,14 @@ void PixelShaderManager::SetConstants() { //bpmem.fogRange.Base.Center : center of the viewport in x axis. observation: bpmem.fogRange.Base.Center = realcenter + 342; int center = ((u32)bpmem.fogRange.Base.Center) - 342; - // normalice center to make calculations easy + // normalize center to make calculations easy float ScreenSpaceCenter = center / (2.0f * xfregs.viewport.wd); ScreenSpaceCenter = (ScreenSpaceCenter * 2.0f) - 1.0f; - //bpmem.fogRange.K seems to be a table of precalculated coeficients for the adjust factor - //observations: bpmem.fogRange.K[0].LO apears to be the lowest value and bpmem.fogRange.K[4].HI the largest - // they always seems to be larger than 256 so my teory is : - // they are the coeficients from the center to th e border of the screen - // so to simplify i use the hi coeficient as K in the shader taking 256 as the scale + //bpmem.fogRange.K seems to be a table of precalculated coefficients for the adjust factor + //observations: bpmem.fogRange.K[0].LO appears to be the lowest value and bpmem.fogRange.K[4].HI the largest + // they always seems to be larger than 256 so my theory is : + // they are the coefficients from the center to the border of the screen + // so to simplify I use the hi coefficient 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 |
