|
@@ -5175,8 +5175,13 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
switch ( blending ) {
|
|
|
|
|
|
+ case THREE.NoBlending:
|
|
|
+ _gl.disable( _gl.BLEND );
|
|
|
+ break;
|
|
|
+
|
|
|
case THREE.AdditiveBlending:
|
|
|
|
|
|
+ _gl.enable( _gl.BLEND );
|
|
|
_gl.blendEquation( _gl.FUNC_ADD );
|
|
|
_gl.blendFunc( _gl.SRC_ALPHA, _gl.ONE );
|
|
|
|
|
@@ -5185,7 +5190,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
case THREE.SubtractiveBlending:
|
|
|
|
|
|
// TODO: Find blendFuncSeparate() combination
|
|
|
-
|
|
|
+ _gl.enable( _gl.BLEND );
|
|
|
_gl.blendEquation( _gl.FUNC_ADD );
|
|
|
_gl.blendFunc( _gl.ZERO, _gl.ONE_MINUS_SRC_COLOR );
|
|
|
|
|
@@ -5194,7 +5199,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
case THREE.MultiplyBlending:
|
|
|
|
|
|
// TODO: Find blendFuncSeparate() combination
|
|
|
-
|
|
|
+ _gl.enable( _gl.BLEND );
|
|
|
_gl.blendEquation( _gl.FUNC_ADD );
|
|
|
_gl.blendFunc( _gl.ZERO, _gl.SRC_COLOR );
|
|
|
|
|
@@ -5202,6 +5207,7 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
default:
|
|
|
|
|
|
+ _gl.enable( _gl.BLEND );
|
|
|
_gl.blendEquationSeparate( _gl.FUNC_ADD, _gl.FUNC_ADD );
|
|
|
_gl.blendFuncSeparate( _gl.SRC_ALPHA, _gl.ONE_MINUS_SRC_ALPHA, _gl.ONE, _gl.ONE_MINUS_SRC_ALPHA );
|
|
|
|