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

WebGLRenderer: Use empty texture instead of null for shadow-less lights. Fixes #9037.

上级 9ab90a57
......@@ -31,6 +31,8 @@ THREE.WebGLRenderer = function ( parameters ) {
var morphInfluences = new Float32Array( 8 );
var emptyTexture = new THREE.Texture();
var sprites = [];
var lensFlares = [];
......@@ -2339,7 +2341,7 @@ THREE.WebGLRenderer = function ( parameters ) {
intensity = light.intensity;
distance = light.distance;
shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : null;
shadowMap = ( light.shadow && light.shadow.map ) ? light.shadow.map.texture : emptyTexture;
if ( light instanceof THREE.AmbientLight ) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册