summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
diff options
context:
space:
mode:
authorRyan Houdek <Sonicadvance1@gmail.com>2013-11-13 16:17:42 -0600
committerRyan Houdek <Sonicadvance1@gmail.com>2013-11-13 16:17:42 -0600
commit2a23bdde6f76c0bff0906bbbee298480b52ba0c2 (patch)
tree22a7bccfb1cb25d4c9f247ca3d43904a4a6d79dc /Source/Core/VideoCommon/Src/PixelShaderManager.cpp
parent3c7613fc83981f9ef8efa2e4ac478af9fe23bdec (diff)
parent63a9dff3bb8c88cdc5b941db1f3813843c7a8564 (diff)
Merge branch 'master' into android-new-control-input-overlay
Conflicts: Source/Core/DolphinWX/Src/Android/ButtonManager.h
Diffstat (limited to 'Source/Core/VideoCommon/Src/PixelShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/PixelShaderManager.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
index 5f793b5a44..98722e48ce 100644
--- a/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/PixelShaderManager.cpp
@@ -29,7 +29,7 @@ void PixelShaderManager::Dirty()
s_bFogRangeAdjustChanged = true;
s_bViewPortChanged = true;
nLightsChanged[0] = 0; nLightsChanged[1] = 0x80;
-
+
SetColorChanged(0, 0);
SetColorChanged(0, 1);
SetColorChanged(0, 2);
@@ -84,7 +84,7 @@ void PixelShaderManager::SetConstants(u32 components)
// 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
constants.fog[2][0] = ScreenSpaceCenter;
- constants.fog[2][1] = Renderer::EFBToScaledX((int)(2.0f * xfregs.viewport.wd));
+ constants.fog[2][1] = (float)Renderer::EFBToScaledX((int)(2.0f * xfregs.viewport.wd));
constants.fog[2][2] = bpmem.fogRange.K[4].HI / 256.0f;
}
else
@@ -135,7 +135,7 @@ void PixelShaderManager::SetConstants(u32 components)
nLightsChanged[0] = nLightsChanged[1] = -1;
}
}
-
+
if(s_bViewPortChanged)
{
constants.zbias[1][0] = xfregs.viewport.farZ / 16777216.0f;
@@ -156,7 +156,7 @@ void PixelShaderManager::SetColorChanged(int type, int num)
c[num][2] = bpmem.tevregs[num].high.a / 255.0f;
c[num][1] = bpmem.tevregs[num].high.b / 255.0f;
dirty = true;
-
+
PRIM_LOG("pixel %scolor%d: %f %f %f %f\n", type?"k":"", num, c[num][0], c[num][1], c[num][2], c[num][3]);
}
@@ -179,7 +179,7 @@ void PixelShaderManager::SetTexDims(int texmapid, u32 width, u32 height, u32 wra
// or better, use textureSize() in glsl
if(constants.texdims[texmapid][0] != 1.0f/width || constants.texdims[texmapid][1] != 1.0f/height)
dirty = true;
-
+
constants.texdims[texmapid][0] = 1.0f/width;
constants.texdims[texmapid][1] = 1.0f/height;
}
@@ -263,8 +263,8 @@ void PixelShaderManager::SetZTextureTypeChanged()
void PixelShaderManager::SetTexCoordChanged(u8 texmapid)
{
TCoordInfo& tc = bpmem.texcoords[texmapid];
- constants.texdims[texmapid][2] = tc.s.scale_minus_1 + 1;
- constants.texdims[texmapid][3] = tc.t.scale_minus_1 + 1;
+ constants.texdims[texmapid][2] = (float)(tc.s.scale_minus_1 + 1);
+ constants.texdims[texmapid][3] = (float)(tc.t.scale_minus_1 + 1);
dirty = true;
}
@@ -283,7 +283,7 @@ void PixelShaderManager::SetFogParamChanged()
constants.fog[1][0] = bpmem.fog.a.GetA();
constants.fog[1][1] = (float)bpmem.fog.b_magnitude / 0xFFFFFF;
constants.fog[1][2] = bpmem.fog.c_proj_fsel.GetC();
- constants.fog[1][3] = 1 << bpmem.fog.b_shift;
+ constants.fog[1][3] = (float)(1 << bpmem.fog.b_shift);
}
else
{
@@ -336,7 +336,7 @@ void PixelShaderManager::DoState(PointerWrap &p)
{
p.Do(constants);
p.Do(dirty);
-
+
if (p.GetMode() == PointerWrap::MODE_READ)
{
Dirty();