HarbourMasters / Shipwright

3.14k stars 481 forks source link

[Bug] Composer Brothers have glitchy faces #4000

Open SuperBro64 opened 6 months ago

SuperBro64 commented 6 months ago

This is a visual bug that as far as I'm aware has been present in SoH for a long time now (I think I remember it being there when I first played SoH in Summer 2022). I didn't see any mention of this on the Issues list, so I'm reporting it now. This bug occurs as of the most recent dev build.

In SoH, the Composer Brothers currently have glitchy faces that don't match their vanilla appearances. Below, I have posted SoH screenshots of their faces alongside comparison pictures of what they should actually look like (taken from the Zelda Wiki). I've also posted a screenshot of a normal Poe's face, which has no problems. All screenshots were taken on OpenGL, but I've confirmed that the bug happens on DirectX, also.

Sharp's normal appearance: image

Sharp as seen in SoH: image

Flat's normal appearance: image

Flat as seen in SoH: image

A Poe's normal appearance: image

A Poe as seen in SoH: image

Archez commented 6 months ago

Can you please indicate the game version(s) that you have seen this error on?

SuperBro64 commented 6 months ago

Can you please indicate the game version(s) that you have seen this error on?

The screenshots I took above were from PAL 1.1. I have the other supported versions available, so I can test on those versions too and report back.

Gamer1758 commented 6 months ago
Screenshot 2024-03-05 174706 Screenshot 2024-03-05 174824 Screenshot 2024-03-05 174901

can confirm still exists on latest version as well

SuperBro64 commented 6 months ago

So I just tested this on six fresh installs of SoH using every currently supported version (PAL 1.0, PAL 1.1, PAL GC, PAL MQ, PAL GC Debug, PAL MQ Debug).

I can confirm that this bug occurs on every version, with the faces being glitched in the same way each time (i.e., they aren't glitching differently between versions).

Archez commented 6 months ago

Thanks. I think I see the problem now, I believe it's related to some of the extracted vertices being missing or something. Will keep digging.

Archez commented 6 months ago

Ok the bug is due to our texture cache at the renderer level. An earlier display list loads only a quarter of the eye texture, then that result is cached. Later when the real eye display list loads the texture, the cache is found and used, but doesn't have all the texture data leading to the observed issue.

A fix would require tweaking the cache lookup to consider "loaded size".

SuperBro64 commented 6 months ago

A fix would require tweaking the cache lookup to consider "loaded size".

I'm not familiar with the inner workings of SoH, so due to how you worded this I'm curious if this would be an easy or a hard fix.

Archez commented 6 months ago

A fix would require tweaking the cache lookup to consider "loaded size".

I'm not familiar with the inner workings of SoH, so due to how you worded this I'm curious if this would be an easy or a hard fix.

Fix is already made 🙂 https://github.com/Kenix3/libultraship/pull/460