From c4d8ebcad5e2da5a8e66a02ead48331199fb30a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 11 Jan 2023 12:14:47 +0100 Subject: [PATCH] D3D11 fix --- GPU/Common/FragmentShaderGenerator.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GPU/Common/FragmentShaderGenerator.cpp b/GPU/Common/FragmentShaderGenerator.cpp index 9224b07999..d45f8391e7 100644 --- a/GPU/Common/FragmentShaderGenerator.cpp +++ b/GPU/Common/FragmentShaderGenerator.cpp @@ -302,7 +302,8 @@ bool GenerateFragmentShader(const FShaderID &id, char *buffer, const ShaderLangu } WRITE(p, "struct PS_IN {\n"); - if (doTexture) { + if (doTexture || compat.shaderLanguage == HLSL_D3D11) { + // In D3D11, if we always have a texcoord in the VS, we always need it in the PS too for the structs to match. WRITE(p, " vec3 v_texcoord: TEXCOORD0;\n"); } const char *colorInterpolation = doFlatShading && compat.shaderLanguage == HLSL_D3D11 ? "nointerpolation " : "";