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

NormalBlending is now 1:1 with Blender :_)

No wonder there were premultiplied-alpha-looking issues. We were doing it ourselves :P
上级 6c1b9c58
此差异已折叠。
此差异已折叠。
......@@ -1528,12 +1528,7 @@ THREE.WebGLRenderer = function ( parameters ) {
function refreshUniformsCommon( uniforms, material ) {
// premultiply alpha
uniforms.diffuse.value.setRGB( material.color.r * material.opacity, material.color.g * material.opacity, material.color.b * material.opacity );
// pure color
//uniforms.color.value.setHex( material.color.hex );
uniforms.diffuse.value.setRGB( material.color.r, material.color.g, material.color.b );
uniforms.opacity.value = material.opacity;
uniforms.map.texture = material.map;
......@@ -3343,7 +3338,7 @@ THREE.WebGLRenderer = function ( parameters ) {
default:
_gl.blendEquationSeparate( _gl.FUNC_ADD, _gl.FUNC_ADD );
_gl.blendFuncSeparate( _gl.SRC_ALPHA, _gl.ONE_MINUS_SRC_ALPHA, _gl.ONE, _gl.ONE );
_gl.blendFuncSeparate( _gl.SRC_ALPHA, _gl.ONE_MINUS_SRC_ALPHA, _gl.ONE, _gl.ONE_MINUS_SRC_ALPHA );
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册