Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Wii U) At 2X, integer scaling works only on the Gamepad and not on the TV screen #4655

Closed
MeisterLLD opened this issue Feb 17, 2017 · 7 comments · Fixed by #4659
Closed

Comments

@MeisterLLD
Copy link

MeisterLLD commented Feb 17, 2017

Description

On NES and SNES cores (mGBA seems to work fine), if we set up integer scaling and a custom aspect ratio, the image is pixel perfect at a 2X resolution. But weirdly, on the TV screen it's not.
Starting from 4X it's actually getting perfect on the TV screen as well.

I used any NES core with Super Mario Bros. (US), it's quite clear on the diagonal on the first hill we can see. Or on the cloud (because at higher resolutions you can't see the hill anymore)
Or in Snes9X, A Link to the Past, see the bottom-left corner of the house (or the green stones).

Expected behavior

The image should be pixel perfect on both screens.

Actual behavior

It seems to be pixel perfect on the Gamepad at 2X and then multiplied by 1.5 to be sent on the TV (as if the Gamepad was treated as the main display, instead of two separate ones). This might explain why at 4X it starts to be good on both (that non-integer 1.5 scaling becoming a 3 in total, thus integer and no problems anymore).

More details can be found here
https://gbatemp.net/threads/retroarch-wiiu-wip.447670/page-196#post-7103302

Version/Commit

1.4.1 of Retroarch Launcher and its cores.

Remark

On top of that there seems to be troubles with "Core provided" aspect ratios (like Snes9X being not correct in the first place, one needs to set integer scale on, but on the contrary Nestopia provided is correct and integer scale becomes 1:1 so wrong, but nonetheless pixel perfect at 2X). But that is probably some core related issues, whereas the general problem I was describing above definitely seems Wii U+Retroarch dependent.

Pictures

https://goo.gl/photos/shvtywNntbSzBX8CA Cloud not correct on TV at 2X
https://goo.gl/photos/GvqMNd4ZrFzWwbm36 Cloud correct on Gamepad at 2X
https://goo.gl/photos/39g1gYhpp7p8BSc27 Cloud correct on TV at 4X

@aliaspider
Copy link
Contributor

aliaspider commented Feb 17, 2017

viewport calculations are currently done using the gamepad resolution. the TV still renders at whatever resolution was set in the settings. so yeah 2x will actually be 3x on the TV if it was set to 720p. I don't see why you would consider 3x not 'pixel perfect' though.
I still haven't come up with a better system for handling both displays, like giving some control over the active/internal resolution, and which of the two displays is the 'main' one.
the most I could do right now is use the TV resolution for the viewport settings instead of the gamepad, if that is preferred.

@MeisterLLD
Copy link
Author

Thanks for the quick answer ! What do you mean by 3x being perfect, the 3x on the TV from the 2x set in Retroarch ? In that case, as you can see in the pictures, some squares become non-square, that is why I would say it's not pixel perfect.
If you speak about setting 3x in Retroarch to begin with, I don't remember if it is, I'll check in later.

I understand that this is both a difficult problem and also open to preferences. Personnaly my mind is not clear yet on what I prefer and I wouldn't dare speak for the whole community, so I don't know what people really prefer !
In any case I appreciate your work and being able to play perfect pixel games on the Gamepad is already something great !

@aliaspider
Copy link
Contributor

yeah I meant 2x in the settings, it should in theory give you a clean 3x if your TV is set to 720p.
I'll see if I can test this soon, I rarely even use the TV :P

@MeisterLLD
Copy link
Author

My TV is a Samsung smart TV set to "screen fit", so it doesn't force any resolution, I don't think the problem can come from it.
It might be the following (with my bad words) : indeed 3 = 2*(3/2), so theoretically both are integer scaled, but in practice, if there is this 3/2 (thus non-integer) scaling from the Gamepad to the TV, maybe it creates artifacts in this process (as it is a non-integer scaling) ?

In other words, non integer scaling times integer scaling could create artifacts even though the total scaling is "integer".

@aliaspider
Copy link
Contributor

ah I know, your TV resolution is 1080 and not 720? I assumed 720 since you said x1.5 .
yeah that is normal then, 2x on the gamepad with nearest scaling will look bad on the TV @ 1080.
since the ratio here is 2.25, you only get 'pixel perfect' for 4x.
I will just go ahead and make it use the TV resolution for viewport calculations then, it will cover more use cases, and it would still be possible to get back the old behaviour on the gamepad by setting the system resolution to 480p ( a bit annoying but at least still doable, until I can think of a better solution).

@MeisterLLD
Copy link
Author

MeisterLLD commented Feb 17, 2017 via email

@SirPrimalform
Copy link

SirPrimalform commented Feb 17, 2017

Ah, mine is 720p and I was seeing bad scaling with GBA games on the TV (because 3x scaling fills the gamepad, but 3*1.5 is 4.5).

Is the monitor index parameter used for anything on the Wii U? My proposal is to use that to select the primary display if that seems feasible. You could have settings for Gamepad main - TV secondary, TV main - gamepad secondary, Gamepad only and TV only.

p.s. It's eyeball226, thanks for paying attention to my crazy ramblings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants