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

Skeleton: Compute a smaller texture dimension #27211

Merged
merged 1 commit into from
Nov 19, 2023

Conversation

gkjohnson
Copy link
Collaborator

@gkjohnson gkjohnson commented Nov 19, 2023

Related issue: #27202

Description

Computes a smaller, non-power of two texture dimension for storing the bone matrices. It's a small memory savings in more common cases but why not. There shouldn't be any reason to require a PoT texture here since mipmaps aren't used:

bone count old size new size
17 16 12
65 32 20
257 64 36
1025 128 68

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
668.2 kB (165.8 kB) 668.2 kB (165.9 kB) +6 B

🌳 Bundle size after tree-shaking

Minimal build including a renderer, camera, empty scene, and dependencies.

Filesize dev Filesize PR Diff
449.4 kB (108.9 kB) 449.4 kB (108.9 kB) +0 B

@Mugen87 Mugen87 added this to the r159 milestone Nov 19, 2023
@Mugen87 Mugen87 merged commit aee3a57 into mrdoob:dev Nov 19, 2023
12 checks passed
@gkjohnson gkjohnson deleted the bone-texture-optimization branch November 19, 2023 11:30
AdaRoseCannon pushed a commit to AdaRoseCannon/three.js that referenced this pull request Jan 15, 2024
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.

None yet

2 participants