From 2bb2084eced3499441235689b0cf41c7a2dbb6d4 Mon Sep 17 00:00:00 2001 From: Matt Borgerson <contact@mborgerson.com> Date: Fri, 26 Jul 2024 17:21:01 -0700 Subject: [PATCH] nv2a/vk: Use textureLod in psh_append_shadowmap --- 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 58ad5cf7ac..35e95855bd 100644 --- a/hw/xbox/nv2a/pgraph/glsl/psh.c +++ b/hw/xbox/nv2a/pgraph/glsl/psh.c @@ -643,10 +643,10 @@ static void psh_append_shadowmap(const struct PixelShader *ps, int i, bool compa if (ps->state.tex_x8y24[i]) { mstring_append_fmt( vars, - "uvec4 t%d_depth_raw = texture(texSamp%d, pT%d.xy/pT%d.w);\n", i, i, i, i); + "uvec4 t%d_depth_raw = textureLod(texSamp%d, pT%d.xy/pT%d.w, 0);\n", i, i, i, i); mstring_append_fmt( vars, - "vec4 t%d_depth = vec4(float(t%d_depth_raw.x & 0xFFFFFF), 1.0, 0.0, 0.0);", + "vec4 t%d_depth = vec4(float(t%d_depth_raw.x & 0xFFFFFF), 1.0, 0.0, 0.0);\n", i, i); } else { mstring_append_fmt(