Skip to content

clamp lower bound of mipmap width/height#55

Open
buhman wants to merge 1 commit intoSaschaWillems:mainfrom
buhman:mipmap-clamp
Open

clamp lower bound of mipmap width/height#55
buhman wants to merge 1 commit intoSaschaWillems:mainfrom
buhman:mipmap-clamp

Conversation

@buhman
Copy link
Copy Markdown
Contributor

@buhman buhman commented Apr 11, 2026

Prior to this commit, width/height values could be right-shifted to zero (when loading non-square textures).

Prior to this commit, width/height values could be right-shifted to
zero (when loading non-square textures).
@SaschaWillems
Copy link
Copy Markdown
Owner

The tutorial does only use power-of-two textures. Not sure why this is required here.

@buhman
Copy link
Copy Markdown
Contributor Author

buhman commented Apr 11, 2026

It does not increase the complexity of the tutorial code significantly, and it also means that if someone wants to re-use the tutorial code with a different (non-square or non-power-of-two) texture, that the calculated mip level dimensions remain correct.

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