summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VertexShaderManager.cpp
diff options
context:
space:
mode:
authorNanoByte011 <nanobyte011@hotmail.com>2015-01-13 02:55:25 -0700
committerScott Mansell <phiren@gmail.com>2015-01-23 03:32:31 +1300
commitadd59b3bea032e331363dcf28361f8e0de65e43d (patch)
treec1cb3a129663f4ec68e6b8f165508ef5e9b5ebc8 /Source/Core/VideoCommon/VertexShaderManager.cpp
parent6d5065c58d06e14a0c92632ce794958ddff977f3 (diff)
Fixes Mario Tennis Gimmick Courts and adds support for FastDepthCalc
- Calculate ZSlope every flush but only set PixelShader Constant on Reset Buffer when zfreeze - Fixed another Pixel Shader bug in D3D that was giving me grief
Diffstat (limited to 'Source/Core/VideoCommon/VertexShaderManager.cpp')
-rw-r--r--Source/Core/VideoCommon/VertexShaderManager.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/VertexShaderManager.cpp b/Source/Core/VideoCommon/VertexShaderManager.cpp
index a745f7004f..5320e0af2e 100644
--- a/Source/Core/VideoCommon/VertexShaderManager.cpp
+++ b/Source/Core/VideoCommon/VertexShaderManager.cpp
@@ -692,6 +692,7 @@ void VertexShaderManager::ResetView()
void VertexShaderManager::TransformToClipSpace(const float* data, float *out)
{
+ // Can we use constants.posnormalmatrix here instead?
const float *world_matrix = (const float *)xfmem.posMatrices + g_main_cp_state.matrix_index_a.PosNormalMtxIdx * 4;
const float *proj_matrix = &g_fProjectionMatrix[0];
@@ -700,8 +701,6 @@ void VertexShaderManager::TransformToClipSpace(const float* data, float *out)
t[1] = data[0] * world_matrix[4] + data[1] * world_matrix[5] + data[2] * world_matrix[6] + world_matrix[7];
t[2] = data[0] * world_matrix[8] + data[1] * world_matrix[9] + data[2] * world_matrix[10] + world_matrix[11];
- // TODO: this requires g_fProjectionMatrix to be up to date, which is not really a good design decision.
-
out[0] = t[0] * proj_matrix[0] + t[1] * proj_matrix[1] + t[2] * proj_matrix[2] + proj_matrix[3];
out[1] = t[0] * proj_matrix[4] + t[1] * proj_matrix[5] + t[2] * proj_matrix[6] + proj_matrix[7];
out[2] = t[0] * proj_matrix[8] + t[1] * proj_matrix[9] + t[2] * proj_matrix[10] + proj_matrix[11];