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

WebGPURenderer: Fix Material Arrays and Geometry Groups #29278

Merged

Conversation

RenaudRohlinger
Copy link
Collaborator

@RenaudRohlinger RenaudRohlinger commented Aug 31, 2024

Fixed #29268

Description

  • Draw Range on Wireframe Materials: Corrected the drawRange handling for meshes with material.wireframe enabled, ensuring proper rendering.
  • Material Arrays and Geometry Groups: Fixed inconsistencies with material arrays and geometry groups in both WebGPU and WebGL backends. Now, both backends correctly align with expected WebGLRenderer behaviors.
  • New Example added to showcases material arrays, geometry groups, and wireframe rendering for both WebGL and WebGPU backends. The behavior has been validated against WebGLRenderer, ensuring consistency across renderers.
Screenshot 2024-08-31 at 15 36 38

This contribution is funded by Segments.AI & Utsubo

Copy link

github-actions bot commented Aug 31, 2024

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 685.4 kB
169.7 kB
685.4 kB
169.7 kB
+0 B
+0 B
WebGPU 818.7 kB
221.3 kB
819.2 kB
221.5 kB
+520 B
+168 B
WebGPU Nodes 818.3 kB
221.2 kB
818.8 kB
221.4 kB
+939 B
+273 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 462 kB
111.4 kB
462 kB
111.4 kB
+0 B
+0 B
WebGPU 564.8 kB
153.4 kB
565.4 kB
153.5 kB
+520 B
+183 B
WebGPU Nodes 524.2 kB
143.8 kB
524.7 kB
143.9 kB
-40.14 kB
+128 B

@RenaudRohlinger RenaudRohlinger added this to the r169 milestone Aug 31, 2024
examples/files.json Outdated Show resolved Hide resolved
@sunag sunag merged commit 8ca1d4d into mrdoob:dev Aug 31, 2024
12 checks passed
sunag added a commit to sunag/three.js that referenced this pull request Aug 31, 2024
Comment on lines +53 to +56
renderer = new THREE.WebGLRenderer( {
forceWebGL,
antialias: true,
} );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be using WebGPURenderer?

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.

Multiple materials / materialIndex not working when using WebGPURenderer
4 participants