Skip to content

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Apr 27, 2025

Fixed #31006.

Description

LineDashedNodeMaterial is the node variant of LineDashedMaterial. The node version supports a property dashOffset which does exist for LineDashedMaterial. To make the TSL material property materialLineDashOffset compatible with LineDashedMaterial, MaterialNode must check for the existence of dashOffset before creating a uniform node. Otherwise a constant is used.

The PR also applies a minor fix to webgpu_lines_fat_wireframe which ensures the right dash scale property name is used.

@Mugen87 Mugen87 changed the title MaterialNode: Fix dashOffset with LineDashedMaterial. MaterialNode: Fix dashOffset with LineDashedMaterial. Apr 27, 2025
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.49
151.78
547.56
151.81
+70 B
+38 B
WebGPU Nodes 546.84
151.62
546.91
151.66
+70 B
+40 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.34
168.36
622.41
168.39
+70 B
+29 B
WebGPU Nodes 577.22
157.63
577.29
157.65
+70 B
+21 B

@Mugen87 Mugen87 added this to the r177 milestone Apr 27, 2025
@sunag sunag merged commit 6e73733 into mrdoob:dev Apr 27, 2025
12 checks passed
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* MaterialNode: Fix `dashOffset` with `LineDashedMaterial`.

* Examples: Fix dash scale property.
RuthySheffi pushed a commit to RuthySheffi/three.js that referenced this pull request Jun 5, 2025
* MaterialNode: Fix `dashOffset` with `LineDashedMaterial`.

* Examples: Fix dash scale property.
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.

Error on example webgpu_lines_fat_wireframe
2 participants