Skip to content

Commit a6ede2a

Browse files
committed
WebGLState: SubtrctiveBlending does not affect alpha anymore.
1 parent 993946a commit a6ede2a

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

examples/webgl_materials_blending.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@
8888
material.transparent = true;
8989
material.blending = blending.constant;
9090

91-
if ( material.blending === THREE.SubtractiveBlending ) material.opacity = 0;
92-
9391
const x = ( i - blendings.length / 2 ) * 110;
9492
const z = 0;
9593

src/renderers/webgl/WebGLState.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ function WebGLState( gl, extensions, capabilities ) {
667667
break;
668668

669669
case SubtractiveBlending:
670-
gl.blendFunc( gl.ZERO, gl.ONE_MINUS_SRC_COLOR );
670+
gl.blendFuncSeparate( gl.ZERO, gl.ONE_MINUS_SRC_COLOR, gl.ZERO, gl.ONE );
671671
break;
672672

673673
case MultiplyBlending:

0 commit comments

Comments
 (0)