summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
diff options
context:
space:
mode:
authorStenzek <stenzek@users.noreply.github.com>2018-05-22 13:52:26 +1000
committerGitHub <noreply@github.com>2018-05-22 13:52:26 +1000
commit7eaba154a41c72826d4c660753386421f21336d7 (patch)
treed47658663579320c3ec9cbf1e4432ff5d07877af /Source/Core/VideoCommon/TextureConverterShaderGen.cpp
parentf64bd401b692fae42dbc3894d5213b55f5517fdd (diff)
parentf74dbc794c124e6f1c5d5f60ff1d6fe65acc379f (diff)
Merge pull request #6936 from stenzek/copy-filter-depth-fix
EFB2RAM: Apply copy filter as a float coefficient after sampling
Diffstat (limited to 'Source/Core/VideoCommon/TextureConverterShaderGen.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureConverterShaderGen.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
index 748afa29b6..5cfb3e7c76 100644
--- a/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
+++ b/Source/Core/VideoCommon/TextureConverterShaderGen.cpp
@@ -97,15 +97,17 @@ ShaderCode GenerateShader(APIType api_type, const UidData* uid_data)
out.Write(" float4 prev_row = SampleEFB(uv0, -1.0f);\n"
" float4 current_row = SampleEFB(uv0, 0.0f);\n"
" float4 next_row = SampleEFB(uv0, 1.0f);\n"
- " float4 texcol = float4(prev_row.rgb * filter_coefficients[0] +\n"
- " current_row.rgb * filter_coefficients[1] +\n"
- " next_row.rgb * filter_coefficients[2], current_row.a);\n");
+ " float4 texcol = float4(min(prev_row.rgb * filter_coefficients[0] +\n"
+ " current_row.rgb * filter_coefficients[1] +\n"
+ " next_row.rgb * filter_coefficients[2], \n"
+ " float3(1, 1, 1)), current_row.a);\n");
}
else
{
out.Write(
" float4 current_row = SampleEFB(uv0, 0.0f);\n"
- " float4 texcol = float4(current_row.rgb * filter_coefficients[1], current_row.a);\n");
+ " float4 texcol = float4(min(current_row.rgb * filter_coefficients[1], float3(1, 1, 1)),\n"
+ " current_row.a);\n");
}
if (uid_data->is_depth_copy)