summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-04-13 00:58:37 -0500
committerRyan Houdek <Sonicadvance1@gmail.com>2013-04-13 00:58:37 -0500
commit605bbf5ca833399c1a6aad2a3b0e21cb4c910d11 (patch)
tree53acc60e471e39f234af37ac56c4ce39029eb60b /Source/Core/VideoCommon/Src/PixelShaderManager.cpp
parent2444fdbbdd4310f0e012b661d258b20a4eaf4800 (diff)
parent48927c17d252223ffdaa5cfb34aa850eb6ee6ee1 (diff)
Merge remote-tracking branch 'origin/master' into Android-trash
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderManager.cpp12
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