summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureConversionShader.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2022-07-08 18:46:29 -0400
committerGitHub <noreply@github.com>2022-07-08 18:46:29 -0400
commitfac66897af7336b5e2dc2e3b879effb98b30fe47 (patch)
treebb9c79964a90f159554daf8fa62f53043a2b6d29 /Source/Core/VideoCommon/TextureConversionShader.cpp
parentf50e7e6e6d4f8d814636095d098aeeca99666f14 (diff)
parente1e0f42b37dd7f2343b9df99222f32ae56963456 (diff)
Merge pull request #10819 from Dentomologist/fix_shader_compilation_warnings
VideoCommon: Fix D3D shader compilation warnings
Diffstat (limited to 'Source/Core/VideoCommon/TextureConversionShader.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureConversionShader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp
index dd87dfe0af..ed97c48144 100644
--- a/Source/Core/VideoCommon/TextureConversionShader.cpp
+++ b/Source/Core/VideoCommon/TextureConversionShader.cpp
@@ -712,8 +712,8 @@ static void WriteXFBEncoder(ShaderCode& code, APIType api_type, const EFBCopyPar
WriteSampleColor(code, "rgb", "color1", 1, api_type, params);
// Gamma is only applied to XFB copies.
- code.Write(" color0 = pow(color0, float3(gamma_rcp, gamma_rcp, gamma_rcp));\n"
- " color1 = pow(color1, float3(gamma_rcp, gamma_rcp, gamma_rcp));\n");
+ code.Write(" color0 = pow(abs(color0), float3(gamma_rcp, gamma_rcp, gamma_rcp));\n"
+ " color1 = pow(abs(color1), float3(gamma_rcp, gamma_rcp, gamma_rcp));\n");
// Convert to YUV.
code.Write(" const float3 y_const = float3(0.257, 0.504, 0.098);\n"