mkst / sm64-port

My mirror of the sm64-port. You probably want to look at the 3DS port branch: https://github.com/mkst/sm64-port/tree/3ds-port
https://discord.gg/7bcNTPK
252 stars 34 forks source link

Less intensive AA for 3D mode? #20

Closed ryotoko closed 4 years ago

ryotoko commented 4 years ago

Playing around with 3D mode on my N3DS, and have noticed some occasional slowdown, most notably when viewing the entirety of Bob-omb Battlefield from atop the mountain. Disabling AA removes any noticeable slowdown. It just got me thinking if there's a less intensive AA available, maybe something like FXAA?

mkst commented 4 years ago

AFAIK there are only 2 AA modes (well 3 if you include 'no AA'):

typedef enum
{
    GX_TRANSFER_SCALE_NO = 0, ///< No anti-aliasing
    GX_TRANSFER_SCALE_X  = 1, ///< 2x1 anti-aliasing
    GX_TRANSFER_SCALE_XY = 2, ///< 2x2 anti-aliasing
} GX_TRANSFER_SCALE;

Unless someone says otherwise, I'll close this issue in the new few days.

ryotoko commented 4 years ago

These... sound like supersampling methods, which are indeed extremely computationally demanding. It's fine when you have the overhead, but stereoscopic 3D definitely pushes it a bit too far even for the New3DS.

mkst commented 4 years ago

These... sound like supersampling methods, which are indeed extremely computationally demanding. It's fine when you have the overhead, but stereoscopic 3D definitely pushes it a bit too far even for the New3DS.

Yeah, it's just dumbly doubling either vertical/horizontal/both; do you have any evidence to suggest 3DS supports FXAA/similar?

ryotoko commented 4 years ago

I honestly have no idea, certainly something you could implement in software though that may yield equal or worse results. I've definitely seen retail games that have AA though could those all be supersampling...

Can you set the scaling to an arbitrary value, say 1.5x? It's really close to maintaining 30fps in most areas, just dips when things get too heavy, so dialing it back a little until it hits the "magic" value. You don't need integer scaling to get a supersampling effect, though the effect will diminish the closer you get to the native resolution

mkst commented 4 years ago

Closing as there's nothing in the Specification to suggest anything other than super-sampling.

Whilst we could use a different screen resolution (e.g. 1.5x) there is no native support for transferring that, so you'd spend CPU cycles.