Skip to content

Commit

Permalink
alpha.mul to take in account previous alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
Makio64 committed Nov 25, 2024
1 parent eb8c0d2 commit 4b6c85d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/materials/nodes/Line2NodeMaterial.js
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,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.assign( alpha.mul( smoothstep( dnorm.negate().add( 0.5 ), dnorm.add( 0.5 ), norm ).oneMinus() ) );

} else {

Expand All @@ -335,7 +335,7 @@ class Line2NodeMaterial extends NodeMaterial {

If( vUv.y.abs().greaterThan( 1.0 ), () => {

alpha.assign( smoothstep( dlen.oneMinus(), dlen.add( 1 ), len2 ).oneMinus() );
alpha.assign( alpha.mul( smoothstep( dlen.oneMinus(), dlen.add( 1 ), len2 ).oneMinus() ) );

} );

Expand Down

0 comments on commit 4b6c85d

Please sign in to comment.