Skip to content

Renderers: Initial support for Float16Array. #31305

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

Merged
merged 1 commit into from
Jun 24, 2025
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jun 23, 2025

Related issue: #20587 (comment)

Description

The PR introduces initial support for Float16Array as an attribute data type in both renderers.

Since the support for Float16Array is still a bit of a problem, we need to guard every usage to avoid runtime errors.

https://caniuse.com/?search=Float16Array

I did not update Float16BufferAttribute yet which is still a safe pick for all platforms. Developers who want to use Float16Array now should create the array on app level and pass it to BufferAttribute ctor like shown in the updated example.

@Mugen87 Mugen87 changed the title vRenderers: Initial support for Float16Array. Renderers: Initial support for Float16Array. Jun 23, 2025
Copy link

github-actions bot commented Jun 23, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 337.57
78.74
337.65
78.76
+83 B
+25 B
WebGPU 556.8
154.16
556.95
154.24
+156 B
+86 B
WebGPU Nodes 556.15
154
556.3
154.01
+156 B
+19 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 468.75
113.42
468.84
113.43
+83 B
+13 B
WebGPU 632.54
171.18
632.69
171.2
+156 B
+18 B
WebGPU Nodes 587.59
160.53
587.75
160.55
+156 B
+19 B

@sunag sunag added this to the r178 milestone Jun 24, 2025
@Mugen87 Mugen87 merged commit b6fd865 into mrdoob:dev Jun 24, 2025
12 checks passed
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