From 92d65ff3c2c8cadbb2c0df4f5e7dee8d59a8f230 Mon Sep 17 00:00:00 2001 From: kd-11 Date: Mon, 14 Sep 2020 22:47:25 +0300 Subject: [PATCH] rsx: Add support for mixed data types when sampling shadow coordinates --- rpcs3/Emu/RSX/Common/GLSLCommon.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/GLSLCommon.h b/rpcs3/Emu/RSX/Common/GLSLCommon.h index e0604b35c2..abc9b1670a 100644 --- a/rpcs3/Emu/RSX/Common/GLSLCommon.h +++ b/rpcs3/Emu/RSX/Common/GLSLCommon.h @@ -830,8 +830,8 @@ namespace glsl if (props.emulate_shadow_compare) { OS << - "#define TEX2D_SHADOW(index, coord3) texture(TEX_NAME(index), vec3(coord3.xy * texture_parameters[index].scale, min(coord3.z, 1.)))\n" - "#define TEX2D_SHADOWPROJ(index, coord4) textureProj(TEX_NAME(index), vec4(coord4.xy * texture_parameters[index].scale, min(coord4.z, coord4.w), coord4.w))\n"; + "#define TEX2D_SHADOW(index, coord3) texture(TEX_NAME(index), vec3(coord3.xy * texture_parameters[index].scale, min(float(coord3.z), 1.)))\n" + "#define TEX2D_SHADOWPROJ(index, coord4) textureProj(TEX_NAME(index), vec4(coord4.xy, min(coord4.z, coord4.w), coord4.w) * vec4(texture_parameters[index].scale, 1., 1.))\n"; } else {