mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-31 19:48:53 +00: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 https://github.com/ReiKatari/STORM_SWITCH/commit/ff269fbb49388c1b90cd97b944365629e0fcc164 Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4558 Reviewed-by: Shinmegumi <shinmegumi@eden-emu.dev>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user