VOGONS


First post, by vlbastos

User metadata
Rank Newbie
Rank
Newbie

Hi again! I don't know if it's possible, but could you add a new texture filtering option that would use xBRZ (2xBRZ, 3xBRZ, 4xBRZ, 5xBRZ) on textures? That would effectively upscale all textures using xBRZ.
I'm asking this because it was done in some emulators (PPSSPP most notably, see below), and it's great in some games.

Here's the whole Git thread discussing this implementation:
https://github.com/hrydgard/ppsspp/issues/1468

Here's the guy saying he hacked HQ4x support into the texture decoder of PPSSPP:
https://github.com/hrydgard/ppsspp/issues/146 … omment-17177547

Here's the guy saying he integrated xBRZ instead of HQ4x and it looked great:
https://github.com/hrydgard/ppsspp/issues/146 … omment-17193614

Before:

ppssppdebug_2013_04_2z6o8b.png
Filename
ppssppdebug_2013_04_2z6o8b.png
File size
1.15 MiB
Views
1045 views
File license
Public domain

After:

ppssppdebug_2013_04_2rwsai.png
Filename
ppssppdebug_2013_04_2rwsai.png
File size
1.6 MiB
Views
1045 views
File license
Public domain

Reply 1 of 7, by ZellSF

User metadata
Rank l33t
Rank
l33t

Texture replacement has been requested a few times, if Dege implements it I'm guessing automated texture replacement won't be far off. Personally I would love to see normalX scaling (basically, integer scaling textures, great for retaining a pixelated look while texture filtering).

Reply 2 of 7, by mothergoose729

User metadata
Rank Oldbie
Rank
Oldbie
ZellSF wrote on 2023-06-15, 15:53:

Texture replacement has been requested a few times, if Dege implements it I'm guessing automated texture replacement won't be far off. Personally I would love to see normalX scaling (basically, integer scaling textures, great for retaining a pixelated look while texture filtering).

Agreed that this feature would be really useful, but there is a work around.

All of the major graphics vendors support driver level integer scaling, although sometimes only with their more recent GPUs.

Reply 4 of 7, by Dege

User metadata
Rank l33t
Rank
l33t

I forgot to reply this. So, I don't know for the time being. My only concern is that I don't want to just copy-paste other's code or ideas into dgVoodoo.

Maybe a texturer addon in dgV so anyone could implement their own conversion...?

Reply 5 of 7, by vlbastos

User metadata
Rank Newbie
Rank
Newbie

Like texture shaders/plugins? So one could make a xBRZ or normalX shader/plugin, or any other upscaler they have in mind? That would be awesome, if it's possible! I don't know the internals, but I think the idea is to upscale every texture when they're loaded to RAM/VRAM. In old games, with small textures, scaling to 2x or 4x wouldn't hurt the VRAM so much.

I toyed with texture upscaling with Dolphin/PCSX2 before, got awesome results using RealESRGAN (AI upscaler) and the HDcube upscaling model, but that's a totally different beast: it's too heavy to work at loading time. The emu extracts the textures to PNG files, then you upscale to new PNGs, then reload them from inside the emu. This process can be made while running the game (there's a tool called AutoCrispy that helps with that, but it's limited - I made my own batch to do it), but the textures aren't immediately upscaled, and you have to reload them after you upscale them (the emus don't reload automatically).

Dolphin 2022-12-19 03-04-48 original.png
Filename
Dolphin 2022-12-19 03-04-48 original.png
File size
1.76 MiB
Views
722 views
File comment
1080p no upscale
File license
Public domain
Dolphin 2022-12-19 03-04-51 original.png
Filename
Dolphin 2022-12-19 03-04-51 original.png
File size
1.88 MiB
Views
722 views
File comment
1080p HDcube 4x upscale
File license
Public domain

Reply 6 of 7, by Dege

User metadata
Rank l33t
Rank
l33t
vlbastos wrote on 2023-06-27, 22:37:

Like texture shaders/plugins? So one could make a xBRZ or normalX shader/plugin, or any other upscaler they have in mind? That would be awesome, if it's possible! I don't know the internals, but I think the idea is to upscale every texture when they're loaded to RAM/VRAM. In old games, with small textures, scaling to 2x or 4x wouldn't hurt the VRAM so much.

Yes, that'd be possible, I think. In the addon infrastructure I already started to implement the interfaces for this a couple of years ago, but it's in an unfinished inital state (and unfortunately I still have very little time...).
But anyway, basically there were 2 points that could be externally hooked:
- Changing the bitmap in software: when dgVoodoo is about to upload a texture to the video memory, then the bitmap itself could be changed
- Changing the bitmap on GPU: providing a custom shader or a callback that itself draws the final texture using a custom shader (altough this'd be API dependent, so both of DX11/12 solutions would be required)

And yes, I can see the difference on the attached pictures. Having a general (not game-specific) solution for an AI-based texture improvement combined with the existing forced high resolution rendering for old games is a wet dream, I must admit 😀.
Some games could look really cool, like a remake.

Reply 7 of 7, by vlbastos

User metadata
Rank Newbie
Rank
Newbie
Dege wrote on 2023-06-28, 09:02:

And yes, I can see the difference on the attached pictures. Having a general (not game-specific) solution for an AI-based texture improvement combined with the existing forced high resolution rendering for old games is a wet dream, I must admit 😀.
Some games could look really cool, like a remake.

EXACTLY!!! That's the exact idea: instant remakes, in realtime! For now, nothing can be done about the 3d models, but textures and resolution (and antialiasing) CAN be improved, and that's almost enough to make an old game look like a remake! (EDIT: this would be a realtime remaster)

When I was getting the links for RealESRGAN, something came to me: RealESRGAN (and other AI upscalers) are being used to upscale VIDEOS in realtime, at 60 fps. They get great results in animes. What if we used RealESRGAN (or any other FAST upscaler) and a compact model to upscale GAMES in realtime? I mean, upscaling the entire FRAME like they do with anime, not the textures. Got really curious to see something like this working, to see how it would look. Maybe if I capture a movie of a game and apply the upscaling, I can get an idea? 😄
EDIT: Well, I just upscaled these pics I posted, there's really no noticeable difference unless you zoom a lot. Looks like its too much information for the AI, it only adds some kind of antialiasing to some of the edges. Upscaling the textures individually is the way to go. Maybe the NVIDIA RTX Video Super Resolution could get better results, but I don't feel like testing that.