diff --git a/examples/screenshots/webgpu_lines_fat.jpg b/examples/screenshots/webgpu_lines_fat.jpg index c71027ecb8fbb4..acf641594e5489 100644 Binary files a/examples/screenshots/webgpu_lines_fat.jpg and b/examples/screenshots/webgpu_lines_fat.jpg differ diff --git a/examples/webgpu_lines_fat.html b/examples/webgpu_lines_fat.html index b58b308eea5b82..918b285a0b6d2a 100644 --- a/examples/webgpu_lines_fat.html +++ b/examples/webgpu_lines_fat.html @@ -27,7 +27,7 @@ diff --git a/src/materials/nodes/Line2NodeMaterial.js b/src/materials/nodes/Line2NodeMaterial.js index 015fc3f3453552..4918bf36651fd3 100644 --- a/src/materials/nodes/Line2NodeMaterial.js +++ b/src/materials/nodes/Line2NodeMaterial.js @@ -286,7 +286,7 @@ class Line2NodeMaterial extends NodeMaterial { } - const alpha = float( 1 ).toVar( 'alpha' ); + const alpha = float( this.opacityNode ? this.opacityNode : 1 ).toVar( 'alpha' ); if ( useWorldUnits ) { @@ -309,7 +309,7 @@ class Line2NodeMaterial extends NodeMaterial { if ( useAlphaToCoverage && renderer.samples > 1 ) { const dnorm = norm.fwidth(); - alpha.assign( smoothstep( dnorm.negate().add( 0.5 ), dnorm.add( 0.5 ), norm ).oneMinus() ); + alpha.mulAssign( smoothstep( dnorm.negate().add( 0.5 ), dnorm.add( 0.5 ), norm ).oneMinus() ); } else { @@ -334,7 +334,7 @@ class Line2NodeMaterial extends NodeMaterial { If( vUv.y.abs().greaterThan( 1.0 ), () => { - alpha.assign( smoothstep( dlen.oneMinus(), dlen.add( 1 ), len2 ).oneMinus() ); + alpha.mulAssign( smoothstep( dlen.oneMinus(), dlen.add( 1 ), len2 ).oneMinus() ); } );