Higher resolution rendering

Discuss anything about DraStic here.
Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm
Re: Higher resolution rendering

Post by Exophase » Tue Apr 14, 2015 11:14 pm

For huckleberrypie. :P

Image

User avatar
huckleberrypie
Posts:442
Joined:Sat May 31, 2014 4:21 am
Contact:

Re: Higher resolution rendering

Post by huckleberrypie » Wed Apr 15, 2015 1:20 am

Exophase wrote:For huckleberrypie. :P

Image
My reaction to it, mostly:
Image

Seriously though, are there any other games which make (sloppy) use of the viewport feature besides Kit's?

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: Higher resolution rendering

Post by Exophase » Wed Apr 15, 2015 1:29 am

huckleberrypie wrote:Seriously though, are there any other games which make (sloppy) use of the viewport feature besides Kit's?
Not that I am yet aware of. Technically the viewport controls can be used to flip the screen on the X or Y axis, which isn't being emulated. If I run across anything using it like that I'll have to change the way I emulate it.

User avatar
huckleberrypie
Posts:442
Joined:Sat May 31, 2014 4:21 am
Contact:

Re: Higher resolution rendering

Post by huckleberrypie » Wed Apr 15, 2015 1:31 am

Exophase wrote:
huckleberrypie wrote:Seriously though, are there any other games which make (sloppy) use of the viewport feature besides Kit's?
Not that I am yet aware of. Technically the viewport controls can be used to flip the screen on the X or Y axis, which isn't being emulated. If I run across anything using it like that I'll have to change the way I emulate it.
Is it a sort of render to texture feature, e.g. deferred rendering or the same stuff used for the 3DS?

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: Higher resolution rendering

Post by Exophase » Wed Apr 15, 2015 1:37 am

huckleberrypie wrote:Is it a sort of render to texture feature, e.g. deferred rendering or the same stuff used for the 3DS?
No, it's nothing so involved. All games use the viewport, it just specifies the window on the screen that the 3D part gets rendered to. So the 3D scene is scaled and offset to fit that window. The viewport box is specified by providing the lower left and upper right coordinates of the box. Usually games use (0, 0), (255, 191) so it fills the screen. This game uses (0, 255), (255, 191) for that scene which is almost certainly a mistake, but somehow on a DS that's interpreted something like (0, 0), (255, 192). But if you give it (0, 254), (255, 191) instead (or an actual (0, 0), (255, 192)) it totally breaks. So for right now I'm just treating it like (0, 0), (255, 191), which is almost certainly what they meant to do but screwed it up and happened to get away with it somehow.

User avatar
huckleberrypie
Posts:442
Joined:Sat May 31, 2014 4:21 am
Contact:

Re: Higher resolution rendering

Post by huckleberrypie » Wed Apr 15, 2015 1:42 am

Exophase wrote:
huckleberrypie wrote:Is it a sort of render to texture feature, e.g. deferred rendering or the same stuff used for the 3DS?
No, it's nothing so involved. All games use the viewport, it just specifies the window on the screen that the 3D part gets rendered to. So the 3D scene is scaled and offset to fit that window. The viewport box is specified by providing the lower left and upper right coordinates of the box. Usually games use (0, 0), (255, 191) so it fills the screen. This game uses (0, 255), (255, 191) for that scene which is almost certainly a mistake, but somehow on a DS that's interpreted something like (0, 0), (255, 192). But if you give it (0, 254), (255, 191) instead (or an actual (0, 0), (255, 192)) it totally breaks. So for right now I'm just treating it like (0, 0), (255, 191), which is almost certainly what they meant to do but screwed it up and happened to get away with it somehow.
You intercepted that instruction and made it so that it would load up like it would on a real DS?

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: Higher resolution rendering

Post by Exophase » Wed Apr 15, 2015 1:46 am

huckleberrypie wrote:You intercepted that instruction and made it so that it would load up like it would on a real DS?
Sort of. It's may not be exactly right anyway, on a real DS the geometry might be one stretched one pixel longer. And I wouldn't say anything is intercepted, it's just in the code that handles the viewport command.

User avatar
huckleberrypie
Posts:442
Joined:Sat May 31, 2014 4:21 am
Contact:

Re: Higher resolution rendering

Post by huckleberrypie » Wed Apr 15, 2015 1:58 am

Exophase wrote:
huckleberrypie wrote:You intercepted that instruction and made it so that it would load up like it would on a real DS?
Sort of. It's may not be exactly right anyway, on a real DS the geometry might be one stretched one pixel longer. And I wouldn't say anything is intercepted, it's just in the code that handles the viewport command.
Well, it's a workaround for now anyway, unless if some dude complains about their game being horribly broken just due to this.

Also, is the viewport rendered as a flat plane similar to how the PS2 behaves?

Exophase
Posts:1716
Joined:Mon Aug 05, 2013 9:08 pm

Re: Higher resolution rendering

Post by Exophase » Wed Apr 15, 2015 2:05 am

huckleberrypie wrote:Also, is the viewport rendered as a flat plane similar to how the PS2 behaves?
It works pretty much like it does in OpenGL. https://www.khronos.org/opengles/sdk/do ... ewport.xml

Only glViewport takes width/height directly and explicitly doesn't allow either to be negative, plus specifies that they'll be clamped to whatever the valid range is. Meaning there's less opportunity for weird problems.

zeroobligation
Posts:60
Joined:Mon Aug 12, 2013 12:22 pm

Re: Higher resolution rendering

Post by zeroobligation » Wed Apr 15, 2015 7:05 pm

just out of curiosity, will AA be implemented along with high res rendering? :?:

Post Reply