summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
diff options
context:
space:
mode:
authordonkopunchstania <donkopunchstania@gmail.com>2009-02-08 22:08:20 +0000
committerdonkopunchstania <donkopunchstania@gmail.com>2009-02-08 22:08:20 +0000
commitf5f99e8f044a8c6ef8bc3b73b6c1f5540ac9f185 (patch)
tree120f479870a040efb378b080f297821c8a25f569 /Source/Core/VideoCommon/Src/VertexShaderManager.cpp
parent128313cdeaf39f51d3c278730c6d60418552a1fb (diff)
clip space coordinates are now available in fragment shader because depth needs to be computed there instead of the vertex shader. computing it in the vertex shader causes incorrect results sometimes. worked on z textures but 8 bit z texture still is not correct because it breaks SSBM. RE0 now looks ok.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2163 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/VertexShaderManager.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
index 51c373f93c..9ee50ccb5e 100644
--- a/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/Src/VertexShaderManager.cpp
@@ -252,7 +252,7 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
//---------Projection[11]---------
// No hacks
if ((!proj_hax_1 && !proj_hax_2) || (proj_hax_1 && proj_hax_2))
- g_fProjectionMatrix[11] = -(-1.0f - xfregs.rawProjection[5]);
+ g_fProjectionMatrix[11] = -(-0.5f - xfregs.rawProjection[5]);
// Before R945 Hack
if (proj_hax_1 && !proj_hax_2)
@@ -260,7 +260,7 @@ void VertexShaderManager::SetConstants(bool proj_hax_1, bool proj_hax_2)
// R844 Hack
if (!proj_hax_1 && proj_hax_2)
- g_fProjectionMatrix[11] = -xfregs.rawProjection[5];
+ g_fProjectionMatrix[11] = xfregs.rawProjection[5];
//--------------------------------
@@ -431,4 +431,4 @@ void VertexShaderManager::SetMaterialColor(int index, u32 data)
s_fMaterials[15] = ((data)&0xFF)/255.0f;
break;
}
-} \ No newline at end of file
+}