DerKoun / bsnes-hd

bsnes fork that adds HD video features
GNU General Public License v3.0
626 stars 35 forks source link

Incorrect shapes in some cases when uprezzing HDMA #19

Open LivelyZephyrs opened 4 years ago

LivelyZephyrs commented 4 years ago

Another issue. This has to do with some shapes becoming deformed when being uprezzed. Super Mario Kart (5x scale): Super Mario Kart (USA)-009 1x scale, how it's supposed to look: Super Mario Kart (USA)-010

Super Mario RPG (5x scale): Super Mario RPG - Legend of the Seven Stars (USA)-010

1x scale, how it's supposed to look: Super Mario RPG - Legend of the Seven Stars (USA)-009

DerKoun commented 4 years ago

The averaging of the windowing coordinates is too naive ATM. The (too) simple solution would be to add a (fixed or configurable) threshold to define coordinates jumping more than n pixels being a horizontal edge. But I'd prefer something a little more complex, analyzing one more line up and down, so diagonal edges that are close to horizontal can still be processed to HD normally. I'll see if I can fit in at least the simple improvement in one of the next releases.

DerKoun commented 4 years ago

The simple improvement is now implemented: When any of the 4 window coordinates changes by more than 4 from one line to the next, no averaging is done across those lines. For further improvements each coordinate should be handled separately and the threshold should be replaced by more complex detection. This is a low-priority to-do for the moment.