Dolphin, the GameCube and Wii emulator - Forums

Full Version: Video Scaling Question
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have read about integer scaling and understand that the wii would never output video like this. However, I am wondering if there is a way to perfectly scale the 480p output of the wii using nearest neighbour scaling with an integer ratio. In another emulator I am able to scale a 1280x720 image to 2560x1440, resulting in each pixel becoming a 2x2 grid and leaving blackbars at the top and bottom of the monitor. My monitor is 2560*1600, so if the 480p widescreen resolution of 852x480 is scaled by 3, this should result in a resolution of 2556x1440, which is what I am aiming for. Essentially what I want is for each pixel of a 852x480 image (as would be seen on an EDTV) to become a 3x3 grid of pixels on my monitor, without any interpolation

Perhaps it would be better to describe this as scaling the 4:3 output that comes from a wii by a factor of 3 in the vertical direction (480*3=1440) and a factor of 4 in the horizontral direction (640*4=2560) to arrive at 2560x1440. This way, each pixel from the 4:3 output becomes a 4x3 grid of pixels.


Is it possible to configure dolphin to do this, if so how?

I have tried sharp bilinear upscaling and this seems to work in the horizontal direction, however I have noticed vertically, pixels are being interpolated. As seen in the attachment each pixel from the 480p is being cleanly scaled horizontally, but vertically not.
[attachment=20430]

Sorry if this question doesn't make sense. I imagine this isn't useful for most people.
(07-28-2023, 12:14 PM)Devvo Wrote: [ -> ]I have read about integer scaling and understand that the wii would never output video like this. However, I am wondering if there is a way to perfectly scale the 480p output of the wii using nearest neighbour scaling with an integer ratio.

That isn't how the Wii works. By the time the Wii outputs a signal, it is no longer a set of pixels, it's an analog video signal that doesn't have discrete pixels horizontally. What's more, interpreting this signal as a set of square pixels (1:1 PAR) would give you something that does not have a width of 640 (or whatever framebuffer width the game is using), because games scan out image data using non-square pixels. There are even some games that scale the image vertically before scanning it out too, especially PAL games running in 576i mode.

I'm guessing that what you actually want is to see the image the Wii renders (as opposed to the image the Wii outputs) without applying any scaling that isn't integer scaling. Dolphin doesn't have any option for this, since it messes up the game's aspect ratio.
(07-28-2023, 05:53 PM)JosJuice Wrote: [ -> ]That isn't how the Wii works. By the time the Wii outputs a signal, it is no longer a set of pixels, it's an analog video signal that doesn't have discrete pixels horizontally. What's more, interpreting this signal as a set of square pixels (1:1 PAR) would give you something that does not have a width of 640 (or whatever framebuffer width the game is using), because games scan out image data using non-square pixels. There are even some games that scale the image vertically before scanning it out too, especially PAL games running in 576i mode.

I'm guessing that what you actually want is to see the image the Wii renders (as opposed to the image the Wii outputs) without applying any scaling that isn't integer scaling. Dolphin doesn't have any option for this, since it messes up the game's aspect ratio.

Yes I remember reading that the wii renders in a different aspect ratio. I am not trying to see the image the Wii actually renders. What I am trying to describe is if you took the image you would see on a 480p widescreen TV, and scaled this up using nearest neighbour to achieve square pixels. This way what I see on my 2560x1600 screen would look like what would be seen on a 854x480 EDTV. Or, what may look better, is taking what you would see on a 640x480 screen and scaling this to achieve 4:3 pixels on my 2560x1600 screen, as this would perfectly scale to 2560x1440. The AMD graphics driver doesn't support this kind of scaling especially for laptop screens, so I am wondering if there is a way to do this in dolphin.
Sorry, as far as I know, Dolphin doesn't have an option for that either.
Devvo Wrote:Yes I remember reading that the wii renders in a different aspect ratio. I am not trying to see the image the Wii actually renders. What I am trying to describe is if you took the image you would see on a 480p widescreen TV, and scaled this up using nearest neighbour to achieve square pixels

The Sharp Bilinear post processing shader is basically as close as you are going to get to that. Remember however that it is not accurate.

https://dolphin-emu.org/blog/2023/05/21/...ng-shaders

[Image: sharpbilinear1x_thumb.png]
(07-29-2023, 03:24 AM)MayImilae Wrote: [ -> ][Image: sharpbilinear1x_thumb.png]

This is what I am trying to achieve. This comes from a 7680x4320 screenshot with 12x9 pixels so it has been scaled from 640x480. When I try to achieve the same effect the pixels are not clean. Would you know the correct config to get this for 2560x1440 on a 2560x1600 screen? I imagine it depends on the aspect ratio setting, crop, obviously using sharp bilinear, but will this also need something in dolphin.ini?
All I did to get the screenshot was set it to 1x Native, turn on Sharp Bilinear, and go fullscreen. Though I was using a 16:9 AR code, rather than the Widescreen hack. I don't remember if Crop was on.

However, to be clear, Sharp Bilinear gives -as sharp as possible- results, it does not guarantee perfectly sharpness. There are lots of cases where we don't want it to be perfectly sharp as that will cause artifacts and other problems. We talked about why sharp bilinear is better than true nearest neighbor in the Progress Report I linked.
(07-29-2023, 01:52 PM)MayImilae Wrote: [ -> ]All I did to get the screenshot was set it to 1x Native, turn on Sharp Bilinear, and go fullscreen. Though I was using a 16:9 AR code, rather than the Widescreen hack. I don't remember if Crop was on.

Despite alot of trying, I couldn't replicate anything like this screenshot. I really badly made a shader that is hard coded for my very specific use of scaling 640x480 to 2560x1440 on a 2560x1600 screen. I think that the scaling with 3x3 pixels looks accurate to what you might see on a 852x480 digital TV.
[attachment=20443]