提交 22419675 编写于 作者: M Mr.doob

Merge remote-tracking branch 'kovleouf/dev' into dev

......@@ -43,3 +43,4 @@ THREE.AdditiveBlending = 1;
THREE.SubtractiveBlending = 2;
THREE.MultiplyBlending = 3;
THREE.AdditiveAlphaBlending = 4;
THREE.NoBlending = 5;
......@@ -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 );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册