mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-11-02 18:12:41 +01:00
[vk_rasterizer] Fix viewport Y flip for negative scale_y (#4558)
- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md).
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.
-------------------
credit: ReiKatari
Aggelos 1/2 viewport fix
ff269fbb49
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4558
Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
This commit is contained in:
parent
ea92c081b7
commit
035f4611cb
1 changed files with 6 additions and 1 deletions
|
|
@ -82,7 +82,12 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in
|
|||
|
||||
if (lower_left) {
|
||||
// Flip by surface clip height
|
||||
y += conv(static_cast<f32>(regs.surface_clip.height));
|
||||
const float clip_height = conv(static_cast<f32>(regs.surface_clip.height));
|
||||
if (src.scale_y < 0.0f && y >= clip_height) {
|
||||
y = clip_height - y;
|
||||
} else {
|
||||
y += clip_height;
|
||||
}
|
||||
height = -height;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue