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

fix interger types #30166

Closed
wants to merge 1 commit into from
Closed

fix interger types #30166

wants to merge 1 commit into from

Conversation

pubgoso
Copy link

@pubgoso pubgoso commented Dec 19, 2024

The main difference is that while values specified by vertexAttribPointer are always interpreted as floating-point values in the shader (even if they were originally specified as integers in the buffer), this method allows specifying values which are interpreted as integers in the shader.

ref: https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer

The main difference is that while values specified by vertexAttribPointer are always interpreted as floating-point values in the shader (even if they were originally specified as integers in the buffer), this method allows specifying values which are interpreted as integers in the shader.

ref: https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/vertexAttribIPointer
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 339.4
79.05
339.18
79.01
-221 B
-40 B
WebGPU 486.48
134.97
484.69
134.48
-1.8 kB
-489 B
WebGPU Nodes 485.95
134.87
484.15
134.38
-1.8 kB
-486 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.3
112.11
464.66
111.99
-636 B
-115 B
WebGPU 555.58
150.43
553.43
149.79
-2.15 kB
-645 B
WebGPU Nodes 511.65
140.19
509.31
139.5
-2.34 kB
-690 B

@pubgoso pubgoso closed this Dec 19, 2024
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