D3D11 fix

This commit is contained in:
Henrik Rydgård 2023-01-11 12:14:47 +01:00
parent 3d376b0ab7
commit c4d8ebcad5

View file

@ -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 " : "";