diff options
| author | Stenzek <stenzek@users.noreply.github.com> | 2018-05-22 13:52:26 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-05-22 13:52:26 +1000 |
| commit | 7eaba154a41c72826d4c660753386421f21336d7 (patch) | |
| tree | d47658663579320c3ec9cbf1e4432ff5d07877af /Source/Core/VideoCommon/TextureCacheBase.cpp | |
| parent | f64bd401b692fae42dbc3894d5213b55f5517fdd (diff) | |
| parent | f74dbc794c124e6f1c5d5f60ff1d6fe65acc379f (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/TextureCacheBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 48518911bd..c1e112e69a 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1506,10 +1506,14 @@ TextureCacheBase::CopyFilterCoefficientArray TextureCacheBase::GetRAMCopyFilterC { // To simplify the backend, we precalculate the three coefficients in common. Coefficients 0, 1 // are for the row above, 2, 3, 4 are for the current pixel, and 5, 6 are for the row below. - return {static_cast<u32>(coefficients[0]) + static_cast<u32>(coefficients[1]), - static_cast<u32>(coefficients[2]) + static_cast<u32>(coefficients[3]) + - static_cast<u32>(coefficients[4]), - static_cast<u32>(coefficients[5]) + static_cast<u32>(coefficients[6])}; + return { + static_cast<float>(static_cast<u32>(coefficients[0]) + static_cast<u32>(coefficients[1])) / + 64.0f, + static_cast<float>(static_cast<u32>(coefficients[2]) + static_cast<u32>(coefficients[3]) + + static_cast<u32>(coefficients[4])) / + 64.0f, + static_cast<float>(static_cast<u32>(coefficients[5]) + static_cast<u32>(coefficients[6])) / + 64.0f}; } TextureCacheBase::CopyFilterCoefficientArray TextureCacheBase::GetVRAMCopyFilterCoefficients( |
