From 7792a8982963536ae2c4293c5c6c3f3997a1fb21 Mon Sep 17 00:00:00 2001 From: espes Date: Fri, 22 Nov 2013 16:49:29 +1100 Subject: [PATCH] things are a lot less broken if we assume shaders preform the perspective divide... --- hw/xbox/nv2a_vsh.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/xbox/nv2a_vsh.c b/hw/xbox/nv2a_vsh.c index 5be6bc61bd..d182f56492 100644 --- a/hw/xbox/nv2a_vsh.c +++ b/hw/xbox/nv2a_vsh.c @@ -682,7 +682,8 @@ QString* vsh_translate(uint16_t version, "RCP R1.z, R1.z;\n" "MUL R12.xyz, R12, R1;\n" - + "MOV R12.w, 1;\n" + /* Z coord [0;1]->[-1;1] mapping, see comment in transform_projection * in state.c * @@ -691,9 +692,9 @@ QString* vsh_translate(uint16_t version, * into account: z = ((z / w) * 2 - 1) * w, which is the same as * z = z * 2 - w. */ - "# Apply Z coord mapping\n" - "ADD R12.z, R12.z, R12.z;\n" - "ADD R12.z, R12.z, -R12.w;\n" + //"# Apply Z coord mapping\n" + //"ADD R12.z, R12.z, R12.z;\n" + //"ADD R12.z, R12.z, -R12.w;\n" "# End of shader:\n" "MOV oPos, R12;\n"