From 3074ba26c0d298c3247bff8279d5638c58278f91 Mon Sep 17 00:00:00 2001 From: Gert Wollny Date: Fri, 8 Oct 2021 16:13:24 +0200 Subject: [PATCH] blitter: Fix the sample used in the DS depth blitter shader MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since we can't properly resolve the depth buffer, we have to use one samole, so use the sample 0 and not a random value from tc.z. Signed-off-by: Gert Wollny Reviewed-by: Corentin Noël . --- src/vrend_blitter.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vrend_blitter.h b/src/vrend_blitter.h index 40565a9..3da5823 100644 --- a/src/vrend_blitter.h +++ b/src/vrend_blitter.h @@ -132,14 +132,14 @@ "uniform sampler%s samp;\n" \ "in vec4 tc;\n" \ "void main() {\n" \ - " gl_FragDepth = float(texelFetch(samp, %s(tc%s), int(tc.z)).x);\n" \ + " gl_FragDepth = float(texelFetch(samp, %s(tc%s), 0).x);\n" \ "}\n" #define FS_TEXFETCH_DS_MSAA_BODY_GLES \ "uniform mediump sampler%s samp;\n" \ "in vec4 tc;\n" \ "void main() {\n" \ - " gl_FragDepth = float(texelFetch(samp, %s(tc%s), int(tc.z)).x);\n" \ + " gl_FragDepth = float(texelFetch(samp, %s(tc%s), 0).x);\n" \ "}\n"