From 02659dd3cc945d6e2dd9ead46fa89f567e3bc126 Mon Sep 17 00:00:00 2001 From: coldhex Date: Sat, 15 Mar 2025 12:45:20 +0200 Subject: [PATCH] nv2a: Fix cubemap fourth texture coordinate component handling Xbox hardware ignores fourth texture coordinate component for cubemaps. --- hw/xbox/nv2a/pgraph/glsl/psh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/xbox/nv2a/pgraph/glsl/psh.c b/hw/xbox/nv2a/pgraph/glsl/psh.c index a664281f09..e3a566a347 100644 --- a/hw/xbox/nv2a/pgraph/glsl/psh.c +++ b/hw/xbox/nv2a/pgraph/glsl/psh.c @@ -984,8 +984,8 @@ static MString* psh_convert(struct PixelShader *ps) } break; case PS_TEXTUREMODES_CUBEMAP: - mstring_append_fmt(vars, "vec4 t%d = texture(texSamp%d, pT%d.xyz / pT%d.w);\n", - i, i, i, i); + mstring_append_fmt(vars, "vec4 t%d = texture(texSamp%d, pT%d.xyz);\n", + i, i, i); break; case PS_TEXTUREMODES_PASSTHRU: assert(ps->state.border_logical_size[i][0] == 0.0f && "Unexpected border texture on passthru");