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 non-power-of-two texture mip size #43

Merged
merged 1 commit into from
Nov 10, 2024
Merged

Conversation

zeux
Copy link
Contributor

@zeux zeux commented Nov 10, 2024

Non-power-of-two textures eventually get a mip dimension that isn't divisible by 4; the length computation didn't properly round that to block boundaries.

Note: there is still some faulty logic in DataProvider.cpp that misbehaves for NPOT textures, so this doesn't fully fix the case when mips are generated; that would require a separate fix to the downsampling logic (ideally including masking off parts of the NPOT mips that are not used...)

Non-power-of-two textures eventually get a mip dimension that isn't
divisible by 4; the length computation didn't properly round that to
block boundaries.
@wolfpld wolfpld merged commit c54849f into wolfpld:master Nov 10, 2024
@zeux zeux deleted the fix-npot branch November 10, 2024 05:09
@zeux zeux restored the fix-npot branch November 10, 2024 05:09
@zeux zeux deleted the fix-npot branch November 10, 2024 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants