Browse Source

Allow Additive, CustomBlending when material.transparent is false

WestLangley 7 years ago
parent
commit
d0cc21c098
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 );