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

Nodes: Construct clip distances objects in NodeBuilder. #28915

Draft
wants to merge 7 commits into
base: dev
Choose a base branch
from

Conversation

cmhhelgeson
Copy link
Contributor

@cmhhelgeson cmhhelgeson commented Jul 18, 2024

Related issue: #28578, #28615

Allow for the construction of hardware configurable clip distances object within each backend's NodeBuilder.

Copy link

github-actions bot commented Jul 18, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Filesize dev Filesize PR Diff
684 kB (169.4 kB) 684 kB (169.4 kB) +0 B

🌳 Bundle size after tree-shaking

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

Filesize dev Filesize PR Diff
460.9 kB (111.2 kB) 460.9 kB (111.2 kB) +0 B

examples/webgpu_clipculldistance.html Fixed Show fixed Hide fixed
examples/webgpu_clipculldistance.html Fixed Show fixed Hide fixed
examples/webgpu_clipculldistance.html Fixed Show fixed Hide fixed
@cmhhelgeson
Copy link
Contributor Author

cmhhelgeson commented Jul 26, 2024

Is clip-distances available in current browsers. WGSL doesn't seem to recognize clip_distances as an extension in Chrome 127 or Firefox Nightly, and the clip_distances builtin is not recognized with or without the extension. This pull request seems to suggest that it's merged in, while the official W3 documentation includes it as an extendible functionality in vertex shaders.

… no conditional extension support in GLSLNodeBuilder and clip_distances are no longer an enable feature as of Chrome 127, so we'll need to think of a way to support older systems that still need it enabled if that is what we want
@@ -605,6 +606,51 @@

}

enableClipDistanceIndex( index ) {

const extensions = this.renderer.backend.extensions;

Check notice

Code scanning / CodeQL

Unused variable, import, function or class Note

Unused variable extensions.
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.

None yet

1 participant