gonetz / GLideN64

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

Majora's Mask Lens of Truth Depth Issue #2074

Closed Pingler closed 2 years ago

Pingler commented 5 years ago

The Lens of Truth (LoT) effect breaks visuals in GlideN64, some objects become rendered at the wrong distance. This issue occurs the same way in both HLE and LLE mode, and no combination of settings fixes it.

Fairy Bubbles: Correct behavior on hardware: LoT Real N64

GlideN64 behavior: LoT GlideN HLE 1 Fairies render in front of terrain and bridges

Correct behavior in Angrylion RDP Plus (also console verified): LoT AL RDP Plus 1 LoT AL RDP Plus 2 LoT off, Fairy Visible, LoT on, hidden wall blocks fairy

GlideN64 behavior: LoT GlideN LLE LoT off, same as AL+, LoT on, fairy renders in front of hidden wall

Ice: GlideN64 behavior: LoT GlideN HLE 2 LoT GlideN HLE 3 Correct behavior would be that the ice block shouldn't be seen in both cases as they are obscured by Link and the terrain.

Tested on console (PAL), Project64 Nightlies, with GlideN64 3.0, 4.0, and HD texture fix 7, AL RDP Plus (all 3 speed presets) built from source recently (all emulation NTSC-U)

gonetz commented 5 years ago

Could you give me save states to test it?

Pingler commented 5 years ago

ZELDA MAJORA'S MASK.zip Snowhead Temple Bridge

I can't reproduce the ice block issue with HD texture fix 7 (last tested that with 3.0)

Pingler commented 5 years ago

GLideN64_ZELDA_MAJORA'S_MASK_010 GLideN64_ZELDA_MAJORA'S_MASK_011 Hmm, I forgot there was an ice block in the same room as this bridge, it seems like in texture fix 7, LoT on still has a few issues with Ice rendering through terrain, but it doesn't render on top of Link anymore.

Pingler commented 5 years ago

GLideN64_ZELDA_MAJORA'S_MASK_012 This was fixed btw, the other case above is still an issue, as are fairy bubbles (I should clarify that the fairies themselves are affected as well as the bubble)

Jj0YzL5nvJ commented 5 years ago

Very interesting, the glitches reveal "the background work" of LoT with destructible 3D objects or/and translucent elements?

@gonetz, mupen64plus save states: https://0x0.st/zVTf.zip https://0x0.st/zVTO.zip

gonetz commented 5 years ago

Hmm, fairy bubbles issue presents even with N64 depth compare enabled.

ghost commented 5 years ago

I have this issue on 4.0 Release, and current WIP, without custom textures. I want to try and test the Deku Bubble I remember it making certain objects disappear and another setting making the texture stay but the bubble would be invisible.

ghost commented 5 years ago

@gonetz I've never had N64 Depth Compare properly emulate every Zelda effect, fairy bubbles are one. I remember having issues with Deku Bubbles awhile back but I haven't tested the latest releases,

gonetz commented 2 years ago

@Jj0YzL5nvJ Your saves for that problem are not available anymore. Could you give me new saves to test that issue?

@Pingler your save [ZELDA MAJORA'S MASK.zip] is not helpful - it brings me to the dawn of the first day. Could you give me another save(s)?

Jj0YzL5nvJ commented 2 years ago

http://0x0.st/oNaS.zip

gonetz commented 2 years ago

@Jj0YzL5nvJ thanks! Emulator crashed, when I load save "Legend of Zelda, The - Majora's Mask (U) [!].st4", but "Legend of Zelda, The - Majora's Mask (U) [!].st0" save works fine. I checked issues from Snowhead Temple, all are fixed. I opened a PR with the fix: #2674 Please test it when it be ready.

GhostlyDark commented 2 years ago

I can confirm that the fix is working.

Jj0YzL5nvJ commented 2 years ago

Small issue with the shadows outside the area of effect. https://imgur.com/a/shTf6uW

Emulator crashed, when I load save "Legend of Zelda, The - Majora's Mask (U) [!].st4"

Try: http://0x0.st/oN2A.zip

idemockle commented 2 years ago

Hi, using build 4dc0a1f I still see this issue unfortunately. Here is a screencap of a ladder in the background showing through a wall.

image

Jj0YzL5nvJ commented 2 years ago

Hi, I can't reproduce the bug using 4dc0a1fda457e5484a83ea64e0e9a982097961a6. I can only see the "issue" described by a split-second that the shader recompilation takes. https://imgur.com/a/Lql1zwo

Make sure to clear your shader cache and enable depth compare emulation with the most suitable value for your GPU.

idemockle commented 2 years ago

Thank you @Jj0YzL5nvJ! Yep the depth compare was disabled in my config, and enabling that fixed it for me. Here is the location of the setting for in case any other confused people find this in the future.

image