gonetz / GLideN64

A new generation, open-source graphics plugin for N64 emulators.
Other
770 stars 177 forks source link

Explaination. Bad looking 2D textures #1842

Open theboy181 opened 6 years ago

theboy181 commented 6 years ago

Is there a way to make these textures look more like the N64? I see there is a x2 option but maybe this could be salable to the resolution being used?

This is an example of how bad they can look. :(

image

Here is the original item pulled from the ROM

3bf0dc 00000 rgba16

I think its getting filters and it makes it look yucky.

Yui12 commented 6 years ago

Hm does setting it to Original N64 Resolution" work? Oh nevermind as that doesn't help fix the text problem that much in this case after testing it for this game. Anyway, the interesting thing is that this gets automatically fixed when playing these games off a CRT at fullscreen. I do that by using an HDMI to av/s-video converter and just clone the monitor to the TV. I'm telling you this because if the TV fixes this, then that means it is a resolution problem. 2D graphics such as text for example seem to suffer in 3D games in general from this problem. Glide64 does fix this with force filtering, but it sometimes causes other graphical side effects in some games.

Super Mario 64 for example has this problem with text looking all pixelated except when playing off the TV. Angrylion doesn't seem to even help the text problem that much here as well. I don't think it can be fixed unless you play these games at their native resolution on a monitor that can handle it properly since software plugins aren't the answer here as well.

oddMLan commented 6 years ago

I think it's a fair observation, some textures are extremely tiny and do not look good when upscaled. The texture filters do not seem to be helping, as there is not a simple 2x or 4x nearest neighbor option.

So @theboy181 and I propose that, instead of making it a filter, it could be a new feature, linked to the N64 resolution factor slider. imagen

I thought of a name for it even: "Scale textures with internal resolution".

And basically, it would apply a nearest neighbor scaling effect to all textures, depending on the internal resolution (if not using N64 res factor, could take the current resolution and approximate the scale factor). Then at the end the game applies the intended filtering (3-point, bilinear or none).

@theboy181 says he did this scaling manually with a hi-res texture pack and it works quite nicely.

theboy181 commented 6 years ago

To save some CPU cycles, maybe a limit on texture size can be set to what textures will be upscaled. This could be an option to help low end video cards take advantage of the setting.

Redyn commented 6 years ago

Unless you're talking about how they're horizontally stretched, I'm not seeing what's so wrong with the textures in that screenshot? From the ripped pic, the screenshot textures look about the same, except upscaled and smoothed. The fonts shown in the screenshot looks far worse to me, with how pixelated they look (except for the times on the right, which look as smooth as you'd expect).

theboy181 commented 6 years ago

If you look at the 2d textures, you will see they are filtered. I beleive that any 2d texture that the software resizes will get filtered by GLideN64 and it makes them look horrible. The timer in the picture is not scaled so when it’s displayed it looks correct. There are other parts in the game when the timer is shown, but the SW changes it’s size, and then GLideN64 filters it and it looks bad. It is something that should get the attention it deserves as it makes a lot of titles look poor.

I think another great example of this filtering issue occurs with the player pics shown in 1p mode. They are resized by the SW in game and they looked filtered. Other parts of the game where thy are not resized from their original textures they look great at any resolution.

gamemasterplc commented 6 years ago

One thing the unfiltered textures have in common are being copy mode texture rectangles which means the pixels of a texture are quickly and directly copied to the screen with limited effects.

theboy181 commented 6 years ago

Are rectangles ever scaled? Or only triangles?

LegendOfDragoon commented 6 years ago

i think widescreen is making the 2d part look worse.

theboy181 commented 6 years ago

@gammasterplc figured out that there are bits that turn filter on or off for the 2d elements in that game.

Search for 00003000 and NOP them. :)

I’m wondering if something like this can be done from within the GFX plugin.

oddMLan commented 6 years ago

That would be forcing nearest neighbor for all the textures. But what I proposed is simply doing a first-pass nearest neighbor scaling of all textures (how much depends on the internal resolution) and then let the game manage the final pass as always. That would make the textures look less blurry without losing the bilinear filtering.

gamemasterplc commented 6 years ago

@oddMLan how should fractional resolutions be handled for that. @theboy181 rectangles are filtered depending on the G_MDSFT_TEXTFILT bits if not in copy mode for all textures.

oddMLan commented 6 years ago

@gamemasterplc

I said round up to approximate integer multiple of internal resolution.

theboy181 commented 6 years ago

F-Zero X (U) 2D Filtering Off

810690FC 0803 810690FE 5231 810D48C4 3C03 810D48C6 800E 810D48C8 3C17 810D48CA 8034 810D48CC AEE0 810D48CE F5D4 810D48D0 3C17 810D48D2 8034 810D48D4 AEE0 810D48D6 F64C 810D48D8 3C17 810D48DA 8035 810D48DC AEE0 810D48DE D2A4 810D48E0 0801 810D48E2 A440

Note: Eliminates 2D GUI filtering

@gonetz you can use this code if oyu would like to do some testing, and comparing.

oddMLan commented 4 years ago

Duplicate of #1933 ?

gonetz commented 4 years ago

Rather related. Both can be tagged with the same tag.