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

gltfpack: Allow per-texture-class control for texture limit #799

Merged
merged 2 commits into from
Oct 29, 2024
Merged

Conversation

zeux
Copy link
Owner

@zeux zeux commented Oct 29, 2024

Similarly to texture scaling, there are cases where setting individual
limits for different classes can be helpful. Using -ts works when the
input assets are known to have reasonable sizes (and allows to preserve
the size considerations for individual materials), but for a completely
arbitrary input, it can be helpful to enforce a lower limit for normal
maps or attribute maps when they use UASTC.

Follow up for #798.

Similarly to texture scaling, there are cases where setting individual
limits for different classes can be helpful. Using -ts works when the
input assets are known to have reasonable sizes (and allows to preserve
the size considerations for individual materials), but for a completely
arbitrary input, it can be helpful to enforce a lower limit for normal
maps or attribute maps when they use UASTC.

Since we now have a per-kind limit, the power-of-two validation is a
little more cumbersome to do; for now just remove it as it's unclear
that it's practically useful. If -tl is used to specify a
non-power-of-two limit, -tp will simply round it using the existing
logic.
Instead of replicating two different loops in a few different options,
use a helper function that supports an optional mask.
@zeux zeux merged commit 47643ec into master Oct 29, 2024
12 checks passed
@zeux zeux deleted the gltf-kindl branch October 29, 2024 18:42
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.

1 participant