Closed gonetz closed 2 years ago
Is the reason that the new code is only activated for MM is because you are not sure if other games will break? Or do other games break for sure?
The mechanism of LoT in Zelda MM is unique for this game. My previous solution for Zelda MM LoT worked only for Zelda MM. My new solution is also very hackish and Zelda MM specific. I don't know how to make a general solution. Since I never saw smth like this in other games, it's ok to have a specialized solution for a specific problem. Note, that LoT works only in HLE mode with "One piece" BG mode. It was like that before, nothing new here.
I tested the one scenario with the ghost and I didn't see any issues and it appears fixed. I'll check the shadow issue mentioned above.
N64 Depth compare seems to be working ok in Android as well with the LoT.
I do see the issue with the shadow. Shadows seem to disappear when the LoT is active, but only in the area outside the lens of truth effect as shown in the other image posted.
Would understanding how the actor flags are used in oot help to solve this? I dont think the code would be too different in mm, but some actors may have different flags.
Example case:
Small issue with the shadows outside the area of effect. https://i.imgur.com/xc7EYbf.mp4
Savestate: http://0x0.st/oN2A.zip
Emulator crashes on loading of that savestate.
As I see, the shadow issue happens only with N64 depth compare enabled. It is because only z-buffer image texture is copied, while delta-z image texture is just cleared. delta-z is important for correct display of decal surfaces, like shadows. I need to introduce 2 more texture inputs in shaders to copy not only z-buffer, but also delta-z one.
PR updated. Please disable/clear your shader cache.
Another update.
Fixed! It also fixes an unreported problem with footprints =P
Fixed issues from tasks: Majora's Mask Lens of Truth Depth Issue #2074 Lens of truth depth issues #2647
Both regular and N64 depth compare work.