summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-04-08 15:57:51 +0200
committerdegasus <wickmarkus@web.de>2013-04-08 15:57:51 +0200
commit702198f39b4eb71a068c20c9969bd86856fa85ae (patch)
treebdee823a26505a752dc9c512cfb9bcfee0cbe90f /Source/Core/VideoCommon/Src/PixelShaderManager.cpp
parentca8554e7d1d7c77b3c2a9ed8a7fb12de7096c67b (diff)
parent4c40e70b8af839f84d7d9b8306116cabf3965cdb (diff)
Merge branch 'master' into primitive_restart
Conflicts: Source/Core/VideoCommon/Src/VideoConfig.h Source/Plugins/Plugin_VideoDX9/Src/main.cpp Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
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