Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slight variance in source rectangle #122

Open
Sebanisu opened this issue Aug 18, 2019 · 4 comments
Open

Slight variance in source rectangle #122

Sebanisu opened this issue Aug 18, 2019 · 4 comments
Labels
bug Something isn't working

Comments

@Sebanisu
Copy link
Collaborator

Sebanisu commented Aug 18, 2019

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 Sebanisu added the bug Something isn't working label Aug 18, 2019
@Sebanisu
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

@Sebanisu
Copy link
Collaborator Author

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
Copy link
Collaborator Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant