diff options
| author | Connor McLaughlin <stenzek@gmail.com> | 2019-03-29 19:59:25 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-03-29 19:59:25 +1000 |
| commit | 154eeae8ae1e7105bc06e76dc9ff09884190867e (patch) | |
| tree | 2a762e414bd8a67bd03330566c1f58686dc5a7ca /Source/Core/VideoBackends/D3D | |
| parent | 9b6c9252e4dafe91918d91cdabc0c6e27ff9136f (diff) | |
| parent | 16294acd2ae97fc7efa8e885fbfb83b834c7976d (diff) | |
Merge pull request #7915 from stenzek/bbox-scaled-update
VideoBackends: Scale bounding box rectangle in the pixel shader
Diffstat (limited to 'Source/Core/VideoBackends/D3D')
| -rw-r--r-- | Source/Core/VideoBackends/D3D/Render.cpp | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/Source/Core/VideoBackends/D3D/Render.cpp b/Source/Core/VideoBackends/D3D/Render.cpp index a172425e3f..82f3cba743 100644 --- a/Source/Core/VideoBackends/D3D/Render.cpp +++ b/Source/Core/VideoBackends/D3D/Render.cpp @@ -324,40 +324,11 @@ void Renderer::UnbindTexture(const AbstractTexture* texture) u16 Renderer::BBoxRead(int index) { - // Here we get the min/max value of the truncated position of the upscaled framebuffer. - // So we have to correct them to the unscaled EFB sizes. - int value = BBox::Get(index); - - if (index < 2) - { - // left/right - value = value * EFB_WIDTH / m_target_width; - } - else - { - // up/down - value = value * EFB_HEIGHT / m_target_height; - } - if (index & 1) - value++; // fix max values to describe the outer border - - return value; + return static_cast<u16>(BBox::Get(index)); } -void Renderer::BBoxWrite(int index, u16 _value) +void Renderer::BBoxWrite(int index, u16 value) { - int value = _value; // u16 isn't enough to multiply by the efb width - if (index & 1) - value--; - if (index < 2) - { - value = value * m_target_width / EFB_WIDTH; - } - else - { - value = value * m_target_height / EFB_HEIGHT; - } - BBox::Set(index, value); } |
