GPU: Fix GL shaders on Mesa with PGXP + uncorrected colours

This commit is contained in:
Connor McLaughlin 2022-11-22 23:14:50 +10:00
parent 201a671709
commit cf05037428

View file

@ -383,7 +383,7 @@ void ShaderGen::DeclareVertexEntryPoint(
ss << "out VertexData" << output_block_suffix << " {\n";
for (u32 i = 0; i < num_color_outputs; i++)
ss << " " << qualifier << "float4 v_col" << i << ";\n";
ss << " " << (noperspective_color ? "noperspective " : "") << qualifier << "float4 v_col" << i << ";\n";
for (u32 i = 0; i < num_texcoord_outputs; i++)
ss << " " << qualifier << "float2 v_tex" << i << ";\n";
@ -400,7 +400,7 @@ void ShaderGen::DeclareVertexEntryPoint(
const char* qualifier = GetInterpolationQualifier(false, msaa, ssaa, true);
for (u32 i = 0; i < num_color_outputs; i++)
ss << qualifier << "out float4 v_col" << i << ";\n";
ss << qualifier << (noperspective_color ? "noperspective " : "") << "out float4 v_col" << i << ";\n";
for (u32 i = 0; i < num_texcoord_outputs; i++)
ss << qualifier << "out float2 v_tex" << i << ";\n";