(01-02-2013, 10:38 AM)VIRGIN KLM Wrote: Check the updated post I made, what you say is possible for games/emulators like Gamecube and PSOne but not PS2 ones. It's more or less a hardware-software architecture limmitation. I don't say that it's not possible I say that it's not universaly possible, there is no magic thing that can do that.
I did read your post. What you said makes perfect sense, and holds totally true, but only on a physical PlayStation 2.
Graphics plugins like GSDX allow additional flexibility in this case. GSDX is aware of requested internal resolution and the aspect ratio of the output window, while a physical PS2 has no idea what the final aspect ratio of its output will be stretched to when it hits a TV. GSDX also loads and processes 2D objects like textures and sprites separately of 3D, before applying them to the requested geometry or render-layers. This gives us an opportunity to modify these resources before they hit the screen.
Since GSDX is aware of the size and shape of the viewport ("viewport" here refers to the window that is displayed on the desktop) at all times, it's trivial to calculate the size and shape of a 4:3 box centered within the said view-port at all times. And with such a shape defined, we have a constant for constraining the rendering of specific elements within the scene. Very easy.
From there, the graphics plugin just needs to be told what layers to constrain (effectively always keeping said layer squished to a 4:3 box in the middle of whatever crazy viewport the user has created by resizing the window). The Skipdraw hack that's already part of GSDX is most of the way there, though it simply skips the rendering of the selected object. For our purposes we'd want to squish anything selected by this value to our 4:3 box rather than skipping it.
If all else fails, there's also a brute-force way to fix this... two render passes.
- 1st pass: renders the requested frame with 3D output totally disabled (Effectively displaying just 2D content on a black background).
- 2nd pass: renders the requested frame with 2D output totally disabled (So you get the 3D scene with all 2D elements missing).
We now have the two images we need from the game, done and rendered. From here on out, the limitations of the PS2 have no bearing. GSDX can do whatever wants with these two versions of the frame.
So, when these hit the output window, overlay the 1st pass on top of the 2nd pass, but constrain the 1st pass to 4:3 at all times. Instant brute-force fix for 2D being stretched (obviously wont work nicely in all games, but it should totally fix a few).