Skip to content

Avoid unnecessary console warning #30992

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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

Spiri0
Copy link
Contributor

@Spiri0 Spiri0 commented Apr 24, 2025

This PR is only intended to disable the console warning when no attributes are used.

With SBOs + structs / structArrays + drawIndirect / drawIndexedIndirect, there are no longer any attributes. You can precisely control which vertices the vertex shader should be executed for, instead of simply looping through all attribute entries like the classic approach.
Attribute-based geometry is fine, but it's no longer the only way and for highend not the best. The modern approach works without attributes, so missing a position, normal, or uv attribute isn't an error. And I admit that over time, when I'm developing, it bothers me to get a warning in the console that draws attention to something that isn't an error.

Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 336.33
78.33
336.33
78.33
+0 B
+0 B
WebGPU 547.45
151.77
547.37
151.75
-78 B
-20 B
WebGPU Nodes 546.8
151.61
546.72
151.59
-78 B
-20 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 465.78
112.28
465.78
112.28
+0 B
+0 B
WebGPU 622.3
168.35
622.22
168.34
-78 B
-16 B
WebGPU Nodes 577.17
157.62
577.1
157.59
-78 B
-32 B

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