MaKiPL / OpenVIII-monogame

Open source Final Fantasy VIII engine implementation in C# working on Windows and Linux (Android and iOS planned too!) [Monogame]
MIT License
625 stars 59 forks source link

Slight variance in source rectangle #122

Open Sebanisu opened 4 years ago

Sebanisu commented 4 years ago

When drawing icons sometimes it grabs pixels from above or below the correct location in atlas.

This seems to be more aggressive on opengl where you could see it grab 1 or 2 pixels from a nearby image. On directx you can see less pixels changing.

Sebanisu commented 4 years ago

One workaround that make this not as bad is to trim the affected entry. This will remove excess pixels from around the image that contain no data. So when it draws on the screen it is much less likely to grab from a nearby image.

Sebanisu commented 4 years ago

Maybe I should debug output the src at time of drawing to see if it's correct there.

Sebanisu commented 4 years ago

I haven't found any issues with the numbers them selves. I wonder if it's a monogame bug. Though maybe I just haven't found my mistake. I'm thinking it could be monogame because the issue was different in opengl and directx. Opengl had higher variance.

Sebanisu commented 4 years ago

Seems to happen less if x,y,height,width are divisible by 4.