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

WebGLRenderer: These may avoid light to be black but also create hard to understand webgl errors.

上级 951ac23c
......@@ -5065,11 +5065,6 @@ THREE.WebGLRenderer = function ( parameters ) {
_direction.sub( _vector3 );
_direction.normalize();
// skip lights with undefined direction
// these create troubles in OpenGL (making pixel black)
if ( _direction.x === 0 && _direction.y === 0 && _direction.z === 0 ) continue;
dirOffset = dirLength * 3;
dirPositions[ dirOffset ] = _direction.x;
......@@ -5165,11 +5160,6 @@ THREE.WebGLRenderer = function ( parameters ) {
_direction.setFromMatrixPosition( light.matrixWorld );
_direction.normalize();
// skip lights with undefined direction
// these create troubles in OpenGL (making pixel black)
if ( _direction.x === 0 && _direction.y === 0 && _direction.z === 0 ) continue;
hemiOffset = hemiLength * 3;
hemiPositions[ hemiOffset ] = _direction.x;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册