The Tales of Symphonia plug-in miscalculates the scissor rectangle in screen-space. This is largely because most of the places where the scissor rectangle is used (UI and minimap) are not the same aspect ratio or even resolution as the primary rendertarget.
With the original GeDoSaTo plug-in, you can see the problem if you go into the options menu where you set resolution and then scroll up/down. Text extends beyond the top of the frame where it is not supposed to. This happens in other parts of the game too, such as the minimap, but those are harder to demonstrate.
Corrected math based on GeDoSaTo's plug-in can be found here:
This keeps everything perfectly aligned to the original UI clipping rectangles, nothing spills off the mini-map and text in menus never extends above the top of the window frame.
The general idea is to take the (unmodified) render target's dimensions before the scissor rectangle is applied, and reverse-transform the scissor rectangle's coordinates into NDC-space. With that done, it is possible to transform back into window-space for any arbitrary dimensions without it shifting around.
This would be a pull-request, but I haven't bothered to finish setting up the build requirements for GeDoSaTo.
The Tales of Symphonia plug-in miscalculates the scissor rectangle in screen-space. This is largely because most of the places where the scissor rectangle is used (UI and minimap) are not the same aspect ratio or even resolution as the primary rendertarget.
With the original GeDoSaTo plug-in, you can see the problem if you go into the options menu where you set resolution and then scroll up/down. Text extends beyond the top of the frame where it is not supposed to. This happens in other parts of the game too, such as the minimap, but those are harder to demonstrate.
Corrected math based on GeDoSaTo's plug-in can be found here:
https://github.com/Kaldaien/TSF/blob/master/src/render.cpp#L381-L407
This keeps everything perfectly aligned to the original UI clipping rectangles, nothing spills off the mini-map and text in menus never extends above the top of the window frame.
The general idea is to take the (unmodified) render target's dimensions before the scissor rectangle is applied, and reverse-transform the scissor rectangle's coordinates into NDC-space. With that done, it is possible to transform back into window-space for any arbitrary dimensions without it shifting around.
This would be a pull-request, but I haven't bothered to finish setting up the build requirements for GeDoSaTo.