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

GLSLNodeBuilder: Fix usage of flat qualifier. #30428

Merged
merged 1 commit into from
Jan 31, 2025
Merged

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Jan 30, 2025

Related issue: -

Description

When testing webgpu_xr_cubes on an Android device with Chrome, I have noticed a runtime error in the browser console. A vertex shader does not compile correctly since the flat interpolation qualifier is used without a varying which is not valid. Meaning:

flat /*out*/ uint cameraIndex;

To fix the issue, GLSLNodeBuilder now only uses flat in combination with out.

@Mugen87 Mugen87 added this to the r173 milestone Jan 30, 2025
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 517.04
143.54
517.06
143.53
+18 B
-7 B
WebGPU Nodes 516.51
143.43
516.52
143.42
+18 B
-8 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 589.05
159.7
589.07
159.69
+18 B
-8 B
WebGPU Nodes 544.43
149.26
544.45
149.25
+18 B
-8 B

@sunag sunag merged commit 8137a7e into mrdoob:dev Jan 31, 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