Browse Source

Merge pull request #14171 from WestLangley/dev-blending

Allow Additive, CustomBlending when material.transparent is false
Mr.doob 7 years ago
parent
commit
9236564297
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/renderers/webgl/WebGLState.js

+ 3 - 3
src/renderers/webgl/WebGLState.js

@@ -655,9 +655,9 @@ function WebGLState( gl, extensions, utils ) {
 
 		setFlipSided( flipSided );
 
-		material.transparent === true
-			? setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha )
-			: setBlending( NoBlending );
+		( material.blending === NormalBlending && material.transparent === false )
+			? setBlending( NoBlending )
+			: setBlending( material.blending, material.blendEquation, material.blendSrc, material.blendDst, material.blendEquationAlpha, material.blendSrcAlpha, material.blendDstAlpha, material.premultipliedAlpha );
 
 		depthBuffer.setFunc( material.depthFunc );
 		depthBuffer.setTest( material.depthTest );