Skip to content

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Oct 22, 2025

Description

This PR eliminates branching in cube UV reflection fragment shader and may improve performance on mobile GPUs 🤞

https://raw.githack.com/mrdoob/three.js/branchless-cubeuv/examples/index.html
https://raw.githack.com/mrdoob/three.js/branchless-cubeuv/test_cube_uv_performance.html

@github-actions
Copy link

github-actions bot commented Oct 22, 2025

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 350.11
84.81
350.76
85.02
+648 B
+213 B
WebGPU 604.15
169.43
604.15
169.43
+0 B
+0 B
WebGPU Nodes 602.76
169.19
602.76
169.19
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 481.77
119.56
482.42
119.77
+648 B
+204 B
WebGPU 673.57
184.88
673.57
184.88
+0 B
+0 B
WebGPU Nodes 615.56
168.12
615.56
168.12
+0 B
+0 B

mrdoob and others added 2 commits October 21, 2025 21:07
…rt, function or class

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
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