Skip to content

TSL: Align packing nomenclature with packing.glsl.js#33715

Merged
sunag merged 2 commits into
mrdoob:devfrom
WestLangley:dev-tsl_packing
Jun 4, 2026
Merged

TSL: Align packing nomenclature with packing.glsl.js#33715
sunag merged 2 commits into
mrdoob:devfrom
WestLangley:dev-tsl_packing

Conversation

@WestLangley

Copy link
Copy Markdown
Collaborator
directionToColor() -> packNormalToRGB()

colorToDirection() -> unpackRGBToNormal()

It is more precise, and consistent with existing nomenclature.

@WestLangley WestLangley added this to the r185 milestone Jun 4, 2026
@github-actions

github-actions Bot commented Jun 4, 2026

Copy link
Copy Markdown

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 365.48
86.83
365.48
86.83
+0 B
+0 B
WebGPU 659.9
182.66
660.11
182.73
+208 B
+77 B
WebGPU Nodes 657.94
182.35
658.15
182.43
+208 B
+77 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 507.14
123.31
507.14
123.31
+0 B
+0 B
WebGPU 738.73
198.85
738.73
198.85
+0 B
+0 B
WebGPU Nodes 687.95
186.19
687.95
186.19
+0 B
+0 B

Comment thread src/Three.TSL.js Outdated
Comment thread src/nodes/utils/Packing.js Outdated
@sunag sunag merged commit ddb87ac into mrdoob:dev Jun 4, 2026
11 checks passed
@WestLangley WestLangley deleted the dev-tsl_packing branch June 5, 2026 01:39
@WestLangley

Copy link
Copy Markdown
Collaborator Author

Migration Guide updated.

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