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

Renderer: Introduce colorBufferType. #30425

Merged
merged 1 commit into from
Jan 29, 2025
Merged

Renderer: Introduce colorBufferType. #30425

merged 1 commit into from
Jan 29, 2025

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 29, 2025

Related issue: #30387, #30392

Description

This PR introduces a new renderer parameter that allows to define the type of color buffers. By default, THREE.HalfFloatType is used which results in 64bit color buffers. To improve performance in use cases with limited memory or bandwidth, THREE.UnsignedByteType might be used which results in 32bit color buffers.

This change feels indeed better than #30392 which relied on a questionable automatism. The new parameter makes the configuration more explicit.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.27
78.29
336.27
78.29
+0 B
+0 B
WebGPU 516.75
143.47
516.99
143.53
+234 B
+61 B
WebGPU Nodes 516.22
143.36
516.45
143.42
+234 B
+63 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.25
112.13
465.25
112.13
+0 B
+0 B
WebGPU 588.76
159.63
588.99
159.69
+234 B
+58 B
WebGPU Nodes 544.14
149.2
544.38
149.25
+234 B
+56 B

@Mugen87 Mugen87 added this to the r173 milestone Jan 29, 2025
@Mugen87 Mugen87 merged commit 8319d7c into mrdoob:dev Jan 29, 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.

1 participant