Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Why no texture upscaling in PCSX2?
#1
Hi,

Texture upscaling is a feature that many other emulators have, and which it seems to me would be the enhancement that would do most for picture quality, given what enhancements are already implemented. The small size of textures is very visible at higher resolutions. Note that this is not a request. PCSX2 is a mature emulator with much of the fundamental work done and most titles compatible. And this feature is obvious enough that I'd expect that it would already have been implemented if it was possible. I'm not very familiar with the PS2s architecture, but I surmise that something makes it effectively impossible. And that's what I'm curios about.

I did try searching for it on the forum, and got four hits, but three of those were about something else, and the fourth a question where in the code it would have been implemented if it existed. At least that shows that others have considered it too, but it's no answer.
Reply

Sponsored links

#2
Have you tried upscaling beyond Native?
[Insert Witty Sig Here.]
Reply
#3
I think you are confusing texture upscaling with proper filters which give much better results than just upscaling the textures, PS2 itself does support selective bilinear filtering, and PCSX2 does give the option to apply it on all textures.

There are better filters that could be implemented, but the PS2 does not need it as much as older systems do, so it hasn't been implemented yet. There are more important stuff to implement, but it would be nice to have a high level filter one day.
Reply
#4
(10-28-2015, 05:03 PM)K.F Wrote: There are better filters that could be implemented, but the PS2 does not need it as much as older systems do, so it hasn't been implemented yet. There are more important stuff to implement, but it would be nice to have a high level filter one day.

This isn't really why. It comes down to a conflict between how those filters work and how the PS2 works.

This helps explain: http://pcsx2.net/developer-blog/267-expl...tches.html

One of the big problems is PS2 textures are often too "short"

Quote:Globally the upscaling issue is caused by a texture that is too small. This was likely done on purpose to reduce memory usage (PS2 video memory is only 4MB, compared to multiple gigabytes that we have today). Linear filtering allows interpolating a color based on the texels around it. But it requires that those texels exist Wink So textures need to be one texel bigger than they are for linear interpolation. We don't have that possibility, unfortunately.

Because filters like xBRZ, HQ2X etc base pixels/texels on all pixels/texels around a given pixel/texel, it requires that all of those pixels/texels exists. However in many cases they don't on PS2.
[Image: vwah44]
Gaming: Intel i7 3770k @ 4.2Ghz | R9 290 | 16GB RAM | 480GB(240GB+240GB RAID0) SSD | 3 TB HDD | 1 TB HDD | 500GB HDD
Server: AMD FX 6300 @ 4.4Ghz | GTX 670 | 16GB RAM | 240GB SSD | 320GB HDD
PCSX2 General Troubleshooting FAQ
Reply
#5
(10-28-2015, 05:29 PM)Blyss Sarania Wrote: Because filters like xBRZ, HQ2X etc base pixels/texels on all pixels/texels around a given pixel/texel, it requires that all of those pixels/texels exists. However in many cases they don't on PS2.

I thought this is a general problem on all platforms, and it is usually solved by extending the outer edges by assuming the outer pixels having the same color as the last pixel, why is that not possible? I'm assuming it just a performance issue since the PS2 textures are much larger, and the fact that filters do not deliver as great of an improvement in large realistic textures compared to pixel art, but I don't believe there is a technical issue that makes it not possible on PCSX2.

By the way, this is a nice article about different schemes of filtering for anyone interested:

http://datagenetics.com/blog/december32013/index.html
Reply
#6
(10-28-2015, 06:34 PM)K.F Wrote: I thought this is a general problem on all platforms, and it is usually solved by extending the outer edges by assuming the outer pixels having the same color as the last pixel, why is that not possible? I'm assuming it just a performance issue since the PS2 textures are much larger, and the fact that filters do not deliver as great of an improvement in large realistic textures compared to pixel art, but I don't believe there is a technical issue that makes it not possible on PCSX2.

By the way, this is a nice article about different schemes of filtering for anyone interested:

http://datagenetics.com/blog/december32013/index.html

I thought about extending the outer edges too. IDK if it would work or not.

Anyway I was only repeating what gregory told me. I've asked him twice to implement xBRZ because I really like it. But the last time I asked that was the explanation given.
[Image: vwah44]
Gaming: Intel i7 3770k @ 4.2Ghz | R9 290 | 16GB RAM | 480GB(240GB+240GB RAID0) SSD | 3 TB HDD | 1 TB HDD | 500GB HDD
Server: AMD FX 6300 @ 4.4Ghz | GTX 670 | 16GB RAM | 240GB SSD | 320GB HDD
PCSX2 General Troubleshooting FAQ
Reply
#7
If you use higher order interpolations constant extending of texture will give you a lot of rinning. By adding those samplepoints you effectively increase the weight of outer samples. So inner samples (where you actually have valid information) can be negatively affected.

This is especially bad for high contrast edges.

So you should either dynamically increase order the further you are away from the edge or you need a better guess than just assuming constant neighbors.
Reply
#8
(10-28-2015, 06:47 PM)Blyss Sarania Wrote: Anyway I was only repeating what gregory told me. I've asked him twice to implement xBRZ because I really like it. But the last time I asked that was the explanation given.

Fair enough, either way, I'd prefer if the developers work on something more important than filtering.

(10-28-2015, 06:55 PM)willkuer Wrote: If you use higher order interpolations constant extending of texture will give you a lot of rinning. By adding those samplepoints you effectively increase the weight of outer samples. So inner samples (where you actually have valid information) can be negatively affected.

This is especially bad for high contrast edges.

So you should either dynamically increase order the further you are away from the edge or you need a better guess than just assuming constant neighbors.

You are talking about interpolation based filtering schemes like linear and cubic interpolation, but HQx and xBRZ don't work that way. They only lookup the 8 pixels around the source pixel, and use a lookup table to try to find slopes and patterns, and any interpolation they do stay in that 3X3 input grid, no less or more - at least for HQx, xBR looks up more pixels- so no room for dynamic filtering.

As for finding a better guess, extrapolation can be dangerous if you don't know what is in the texture. The resulting outer color could be something that does not make any sense in the context of the image, or if the image has a frame, it might add a weird "halo" around the image. While just repeating the edge - the standard way of doing it - will insure that none of that could happen, and the worse thing that can happen is a not very noticeable thick edge. There is the option of "wrapping" that could be used for tiled textures, or reflecting the image, but that is another story.
Reply
#9
(10-28-2015, 05:29 PM)Blyss Sarania Wrote: This helps explain: http://pcsx2.net/developer-blog/267-expl...tches.html

Thanks for the link. However, this isn't what I asked about, the article discusses issues regarding using larger framebuffers. Interesting nonetheless and some of the information is pertinent. Seems sampling grids are misaligned. That shouldn't conflict with upscaling however, a larger texture would actually partly help, as there would texels relatively closer to the edge. Not that this should be implemented for that reason, the realignment described in the article is obviously a better way. The article has a few technical errors tho'.

(10-28-2015, 05:03 PM)K.F Wrote: I think you are confusing texture upscaling with proper filters which give much better results than just upscaling the textures, PS2 itself does support selective bilinear filtering, and PCSX2 does give the option to apply it on all textures.

There are better filters that could be implemented,

I'm afraid you are the one confusing things here. Filtering happens in the GPU as the texture is applied to the primitive, it doesn't change the texture. And from what I can see, PCSX2 already supports anisotropic filtering, which is what you want to be using, both since you have access to information such as aspect angle during rendering, and because modern GPUs have hardware support for it, making it next to cost free if you have the bandwidth for the extra sampling, which definitely isn't an issue for this app.

(10-28-2015, 05:03 PM)K.F Wrote: but the PS2 does not need it as much as older systems do, so it hasn't been implemented yet.

The PS2 needs it a great deal, given that it only has 4MB of vmem, and textures were sized to fit that. Developers did what they had to do, but we suffer for it.


(10-28-2015, 06:55 PM)willkuer Wrote: If you use higher order interpolations constant extending of texture will give you a lot of rinning. By adding those samplepoints you effectively increase the weight of outer samples. So inner samples (where you actually have valid information) can be negatively affected.

This is especially bad for high contrast edges.

So you should either dynamically increase order the further you are away from the edge or you need a better guess than just assuming constant neighbors.

If you use methods like bicubic you will need to supply some sort of value, and no matter what it that value is, it will affect inner pixels. That's inherent in how it works. So ringing will always happen. (assuming that's what you meant.) One of the reasons I'm not fond of bicubic interpolation.
Reply
#10
xBRz just uses a constant non smooth interpolation function. What I said about rinning was about higher order polynomial interpolation.

That constant extension is bad for filtering is valid for all filters not only higher order polynomial ones.
xBRz and all other (out-of-bounds-sampling) filters are also affected by constant extension. You always increase the weight of edge samples.
Reply




Users browsing this thread: 2 Guest(s)