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

Fix consequences of making vertex variables uint8_t #4

Open
Kasherpete opened this issue May 21, 2024 · 0 comments
Open

Fix consequences of making vertex variables uint8_t #4

Kasherpete opened this issue May 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Kasherpete
Copy link
Owner

Since vertexes are now stored as uint8_t instead of the previous int24_t, data overflows are now a major issue. For some reason this seems to only affect the top of the Y axis, which does make sense when you consider the viewport is goes from x16-144 and y0-128, as none of these values are above 255 and only the top Y axis is 0. The easy fix would to just revert that single Y vertex to a int24_t, which will probably be the best bet and have no visible performance difference whatsoever. I'll see if I can find a different solution, but for now, it looks like the best choice to accept the negligible 0.002% performance decrease in order to remove major screen artifacts that render the viewport useless.

@Kasherpete Kasherpete added the bug Something isn't working label May 21, 2024
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