diff options
| author | JMC47 <JMC4789@gmail.com> | 2021-11-18 17:48:33 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-18 17:48:33 -0500 |
| commit | dbaebdc585d562c25d4cf9360c8da6e078dcc1a6 (patch) | |
| tree | 4b5d604a2086d47a72b332e0bd2abbe7211c89b0 /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | 6f4bbac528682389e34a1a4985820ee5137619c7 (diff) | |
| parent | 9bbc843542656f9b51bbedb1bdca8085677a2c56 (diff) | |
Merge pull request #10222 from phire/fix-copy-filter-clamping
Fix copy filter clamping
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 10b088283d..c774b6d2d1 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -2696,7 +2696,8 @@ void TextureCacheBase::CopyEFBToCacheEntry(TCacheEntry* entry, bool is_depth_cop uniforms.filter_coefficients[2] = filter_coefficients.lower; uniforms.gamma_rcp = 1.0f / gamma; uniforms.clamp_top = clamp_top ? framebuffer_rect.top * rcp_efb_height : 0.0f; - uniforms.clamp_bottom = clamp_bottom ? framebuffer_rect.bottom * rcp_efb_height : 1.0f; + int bottom_coord = framebuffer_rect.bottom - 1; + uniforms.clamp_bottom = clamp_bottom ? bottom_coord * rcp_efb_height : 1.0f; uniforms.pixel_height = g_ActiveConfig.bCopyEFBScaled ? rcp_efb_height : 1.0f / EFB_HEIGHT; uniforms.padding = 0; g_vertex_manager->UploadUtilityUniforms(&uniforms, sizeof(uniforms)); @@ -2761,7 +2762,8 @@ void TextureCacheBase::CopyEFB(AbstractStagingTexture* dst, const EFBCopyParams& encoder_params.y_scale = y_scale; encoder_params.gamma_rcp = 1.0f / gamma; encoder_params.clamp_top = clamp_top ? framebuffer_rect.top * rcp_efb_height : 0.0f; - encoder_params.clamp_bottom = clamp_bottom ? framebuffer_rect.bottom * rcp_efb_height : 1.0f; + int bottom_coord = framebuffer_rect.bottom - 1; + encoder_params.clamp_bottom = clamp_bottom ? bottom_coord * rcp_efb_height : 1.0f; encoder_params.filter_coefficients[0] = filter_coefficients.upper; encoder_params.filter_coefficients[1] = filter_coefficients.middle; encoder_params.filter_coefficients[2] = filter_coefficients.lower; |
