TextureConversionShader: Fix compile errors in OpenGL ES

This commit is contained in:
Stenzek 2018-05-02 21:54:13 +10:00
parent e89ac769fb
commit 2c6b20bb03
2 changed files with 4 additions and 3 deletions

View File

@ -731,8 +731,8 @@ static void WriteXFBEncoder(char*& p, APIType ApiType, const EFBCopyParams& para
WriteSampleColor(p, "rgb", "color1", 1, ApiType, params);
// Gamma is only applied to XFB copies.
WRITE(p, " color0 = pow(color0, gamma_rcp.xxx);\n");
WRITE(p, " color1 = pow(color1, gamma_rcp.xxx);\n");
WRITE(p, " color0 = pow(color0, float3(gamma_rcp, gamma_rcp, gamma_rcp));\n");
WRITE(p, " color1 = pow(color1, float3(gamma_rcp, gamma_rcp, gamma_rcp));\n");
// Convert to YUV.
WRITE(p, " const float3 y_const = float3(0.257, 0.504, 0.098);\n");

View File

@ -256,7 +256,8 @@ ShaderCode GenerateShader(APIType api_type, const UidData* uid_data)
break;
case EFBCopyFormat::XFB:
out.Write(" ocol0 = float4(pow(texcol.rgb, gamma_rcp.xxx), texcol.a);\n");
out.Write(" ocol0 = float4(pow(texcol.rgb, float3(gamma_rcp, gamma_rcp, gamma_rcp)), "
"texcol.a);\n");
break;
default: