Skip to content

Conversation

WestLangley
Copy link
Collaborator

As proposed in #31917 (comment).

Screenshot 2025-09-19 at 10 21 54 PM

In this proof-of-concept, the necessary shader chunks have been introduced into MeshMatcapMaterial only.

wireframe2: true,
wireframeLinewidth: 1,
side: THREE.DoubleSide
} )

Check notice

Code scanning / CodeQL

Semicolon insertion Note

Avoid automated semicolon insertion (93% of all statements in
the enclosing function
have an explicit semicolon).
Copy link

📦 Bundle size

Full ESM build, minified and gzipped.

Before After Diff
WebGL 338.24
79.14
339.25
79.38
+1.01 kB
+241 B
WebGPU 584.78
161.56
584.78
161.56
+0 B
+0 B
WebGPU Nodes 583.39
161.32
583.39
161.32
+0 B
+0 B

🌳 Bundle size after tree-shaking

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

Before After Diff
WebGL 469.7
113.74
470.71
113.99
+1.01 kB
+246 B
WebGPU 654.25
177.07
654.25
177.07
+1 B
+4 B
WebGPU Nodes 608.25
166.24
608.25
166.24
+0 B
+0 B

@sunag
Copy link
Collaborator

sunag commented Sep 21, 2025

I love the example.

I imagine that's not the original intention as it's a proof of concept but I was thinking that if this were a TSL function like material.opacityNode = wireframe( 2 ), it could be more useful in connecting to other types of procedural effects, plus there would be no need to add new parameters for materials.

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 21, 2025

I was also wondering if we should add this feature just for node materials since it will end up easier to maintain and a more flexible solution like outlined in #31921 (comment).

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.

3 participants