Skip to content

Renderers: Initial support for Float16Array.#31305

Merged
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev1
Jun 24, 2025
Merged

Renderers: Initial support for Float16Array.#31305
Mugen87 merged 1 commit intomrdoob:devfrom
Mugen87:dev1

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
@github-actions
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