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"