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

Reverted shadowDarkness removal. See #7321.

上级 f11c485a
......@@ -71,7 +71,7 @@ Object.defineProperties( THREE.Light.prototype, {
},
shadowDarkness: {
set: function ( value ) {
console.warn( 'THREE.Light: .shadowDarkness has been removed.' );
this.shadow.darkness = value;
}
},
shadowMapWidth: {
......
......@@ -7,6 +7,7 @@ THREE.LightShadow = function ( camera ) {
this.camera = camera;
this.bias = 0;
this.darkness = 1;
this.mapSize = new THREE.Vector2( 512, 512 );
......
......@@ -2002,11 +2002,11 @@ THREE.WebGLRenderer = function ( parameters ) {
shadow.matrix.identity().setPosition( _vector3 );
// for point lights we set the sign of the shadowDarkness uniform to be negative
uniforms.shadowDarkness.value[ j ] = - 1.0;
uniforms.shadowDarkness.value[ j ] = - shadow.darkness;
} else {
uniforms.shadowDarkness.value[ j ] = 1.0;
uniforms.shadowDarkness.value[ j ] = shadow.darkness;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册