From 1c068a601d17dde30f61a0410b8f0f90d28d3b72 Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Fri, 2 Jan 2015 00:27:05 -0800 Subject: [PATCH] Munging with viewport stuff. Nasty. --- src/xenia/gpu/gl4/gl4_shader.cc | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/xenia/gpu/gl4/gl4_shader.cc b/src/xenia/gpu/gl4/gl4_shader.cc index 84fc28690..3409824a2 100644 --- a/src/xenia/gpu/gl4/gl4_shader.cc +++ b/src/xenia/gpu/gl4/gl4_shader.cc @@ -77,21 +77,21 @@ bool GL4Shader::PrepareVertexShader( " // w is not 1/W0. Common case.\n" " w = 1.0 / w;\n" " }\n" - " if (state.vtx_fmt.x == 0.0) {\n" + " if (state.vtx_fmt.x != 0.0) {\n" " // Need to multiply by 1/W0.\n" - " pos.xy /= w;\n" + " pos.xy *= w;\n" " }\n" - " if (state.vtx_fmt.z == 0.0) {\n" + " if (state.vtx_fmt.z != 0.0) {\n" " // Need to multiply by 1/W0.\n" - " pos.z /= w;\n" + " pos.z *= w;\n" " }\n" - " pos.w = 1.0;\n" + " pos.w = w;\n" " // Perform clipping, lest we get weird geometry.\n" // TODO(benvanik): is this right? dxclip mode may change this? - " if (pos.z < gl_DepthRange.near || pos.z > gl_DepthRange.far) {\n" - " // Clipped! w=0 will kill it in the hardware persp divide.\n" - " pos.w = 0.0;\n" - " }\n" + //" if (pos.z < gl_DepthRange.near || pos.z > gl_DepthRange.far) {\n" + //" // Clipped! w=0 will kill it in the hardware persp divide.\n" + //" pos.w = 0.0;\n" + //" }\n" " // NDC transform.\n" " pos.x = pos.x * state.viewport_scale.x + \n" " state.viewport_offset.x;\n"