gonetz / GLideN64

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

Glover (Background image problem) #2738

Closed roioros closed 1 year ago

roioros commented 1 year ago

There is a problem with "Glover", the background image is not displayed correctly using the latest version available ------> GLideN64-7bbde56.

I had also tried some previous versions and the same thing happened but in the Public Release 4.0 this problem does not appear.

Here are some examples of what I'm talking about:

GLideN64_Glover_000

Something interesting that I found is that if we activate the option that says "enable inaccurate texture coordinates" it improves a bit, but it still looks incorrect:

GLideN64_Glover_001

Nes-player4Life commented 1 year ago

image PR 4.0 Roioros is correct

Jj0YzL5nvJ commented 1 year ago

Looks good with **rsp-cxd4* and rsp-parallel** (LLE mode).

roioros commented 1 year ago

Is there a way to make it work correctly in HLE, like before?

Thanks.

gonetz commented 1 year ago

Is there a way to make it work correctly in HLE, like before?

Thanks.

Yes. PR created.

gonetz commented 1 year ago

Note: regression commit is 7d237650ef34

It seems that Glover uses slightly different implementation of Sprite2D microcode. Commit 7d237650ef34 improved Wipeout and Silicon Valley, but broke Glover. Ucode description is the same for all three games: "RSP SW Version: 2.0H, 02-12-97" May be @olivieryuyu find time to investigate it? It's not urgent. I just wonder, if the changes are deeper than just decrease of texture coordinates.

roioros commented 1 year ago

Fantastic, thank you so much gonetz for the fix, you're great!

gonetz commented 1 year ago

PR landed. Ready for test.

olivieryuyu commented 1 year ago

@gonetz

i don't see differences at ucode level.

However you should be careful with the limitation of the Sprite microcode.

    _if (GBI.getMicrocodeType() == F3D_Glover) {
        lrs -= 1.0f;
        lrt -= 1.0f;
    }_

seems a bit this limitation:

These filtering conditions also mean that, when displaying a Y-scaled image, you will need to add 1 to the T value to prevent filtering of texels outside the range

http://n64devkit.square7.ch/n64man/ucode/gspSprite2D.htm

olivieryuyu commented 1 year ago

@gonetz

see above

gonetz commented 1 year ago

These filtering conditions also mean that, when displaying a Y-scaled image, you will need to add 1 to the T value to prevent filtering of texels outside the range

Very good note, thanks! I corrected the fix.