diff options
| author | Stenzek <stenzek@gmail.com> | 2018-05-11 00:32:39 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2018-05-11 00:32:39 +1000 |
| commit | 3493d738caef38e00acb855c096f2a414d17efec (patch) | |
| tree | 6e854d7a6b6db724cdfa1040e33bb5947e9014f2 /Source | |
| parent | fd1ea63383f7d9189a14a99948e08fddc4e4d7ee (diff) | |
D3D/Vulkan: Fix incorrect clamp in EFB RAM copy
This could cause darker-than-expected EFB copies if clamping was not
enabled, and the user forced EFB copies to RAM only.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/TextureConverter.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp index de0d9716ec..22b5643416 100644 --- a/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp +++ b/Source/Core/VideoBackends/D3D/PSTextureEncoder.cpp @@ -110,7 +110,7 @@ void PSTextureEncoder::Encode( encode_params.y_scale = y_scale; encode_params.gamma_rcp = 1.0f / gamma; encode_params.clamp_top = clamp_top ? src_rect.top / float(EFB_HEIGHT) : 0.0f; - encode_params.clamp_bottom = clamp_bottom ? src_rect.bottom / float(EFB_HEIGHT) : 0.0f; + encode_params.clamp_bottom = clamp_bottom ? src_rect.bottom / float(EFB_HEIGHT) : 1.0f; for (size_t i = 0; i < filter_coefficients.size(); i++) encode_params.filter_coefficients[i] = filter_coefficients[i]; diff --git a/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp b/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp index cf5d7075f7..496a600f7b 100644 --- a/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp +++ b/Source/Core/VideoBackends/Vulkan/TextureConverter.cpp @@ -245,7 +245,7 @@ void TextureConverter::EncodeTextureToMemory( encoder_params.y_scale = y_scale; encoder_params.gamma_rcp = 1.0f / gamma; encoder_params.clamp_top = clamp_top ? src_rect.top / float(EFB_HEIGHT) : 0.0f; - encoder_params.clamp_bottom = clamp_bottom ? src_rect.bottom / float(EFB_HEIGHT) : 0.0f; + encoder_params.clamp_bottom = clamp_bottom ? src_rect.bottom / float(EFB_HEIGHT) : 1.0f; for (size_t i = 0; i < filter_coefficients.size(); i++) encoder_params.filter_coefficients[i] = filter_coefficients[i]; u8* ubo_ptr = draw.AllocatePSUniforms(sizeof(EFBEncodeParams)); |
