|
@@ -9238,7 +9238,6 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
|
|
_lookTarget.setFromMatrixPosition( light.target.matrixWorld );
|
|
_lookTarget.setFromMatrixPosition( light.target.matrixWorld );
|
|
shadowCamera.lookAt( _lookTarget );
|
|
shadowCamera.lookAt( _lookTarget );
|
|
shadowCamera.updateMatrixWorld();
|
|
shadowCamera.updateMatrixWorld();
|
|
- shadowCamera.matrixWorldInverse.getInverse( shadowCamera.matrixWorld );
|
|
|
|
|
|
|
|
// compute shadow matrix
|
|
// compute shadow matrix
|
|
|
|
|
|
@@ -9269,7 +9268,6 @@ function WebGLShadowMap( _renderer, _lights, _objects, capabilities ) {
|
|
shadowCamera.up.copy( cubeUps[ face ] );
|
|
shadowCamera.up.copy( cubeUps[ face ] );
|
|
shadowCamera.lookAt( _lookTarget );
|
|
shadowCamera.lookAt( _lookTarget );
|
|
shadowCamera.updateMatrixWorld();
|
|
shadowCamera.updateMatrixWorld();
|
|
- shadowCamera.matrixWorldInverse.getInverse( shadowCamera.matrixWorld );
|
|
|
|
|
|
|
|
var vpDimensions = cube2DViewPorts[ face ];
|
|
var vpDimensions = cube2DViewPorts[ face ];
|
|
_state.viewport( vpDimensions );
|
|
_state.viewport( vpDimensions );
|
|
@@ -15647,6 +15645,14 @@ Camera.prototype = Object.assign( Object.create( Object3D.prototype ), {
|
|
|
|
|
|
}(),
|
|
}(),
|
|
|
|
|
|
|
|
+ updateMatrixWorld: function ( force ) {
|
|
|
|
+
|
|
|
|
+ Object3D.prototype.updateMatrixWorld.call( this, force );
|
|
|
|
+
|
|
|
|
+ this.matrixWorldInverse.getInverse( this.matrixWorld );
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+
|
|
clone: function () {
|
|
clone: function () {
|
|
|
|
|
|
return new this.constructor().copy( this );
|
|
return new this.constructor().copy( this );
|
|
@@ -20967,8 +20973,6 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
if ( camera.parent === null ) camera.updateMatrixWorld();
|
|
if ( camera.parent === null ) camera.updateMatrixWorld();
|
|
|
|
|
|
- camera.matrixWorldInverse.getInverse( camera.matrixWorld );
|
|
|
|
-
|
|
|
|
_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
|
|
_projScreenMatrix.multiplyMatrices( camera.projectionMatrix, camera.matrixWorldInverse );
|
|
_frustum.setFromMatrix( _projScreenMatrix );
|
|
_frustum.setFromMatrix( _projScreenMatrix );
|
|
|
|
|
|
@@ -21139,7 +21143,7 @@ function WebGLRenderer( parameters ) {
|
|
state.buffers.depth.setMask( true );
|
|
state.buffers.depth.setMask( true );
|
|
state.buffers.color.setMask( true );
|
|
state.buffers.color.setMask( true );
|
|
|
|
|
|
- if ( camera.isArrayCamera && camera.enabled ) {
|
|
|
|
|
|
+ if ( camera.isArrayCamera ) {
|
|
|
|
|
|
_this.setScissorTest( false );
|
|
_this.setScissorTest( false );
|
|
|
|
|
|
@@ -21313,7 +21317,7 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
object.onBeforeRender( _this, scene, camera, geometry, material, group );
|
|
object.onBeforeRender( _this, scene, camera, geometry, material, group );
|
|
|
|
|
|
- if ( camera.isArrayCamera && camera.enabled ) {
|
|
|
|
|
|
+ if ( camera.isArrayCamera ) {
|
|
|
|
|
|
var cameras = camera.cameras;
|
|
var cameras = camera.cameras;
|
|
|
|
|
|
@@ -21322,14 +21326,13 @@ function WebGLRenderer( parameters ) {
|
|
var camera2 = cameras[ j ];
|
|
var camera2 = cameras[ j ];
|
|
var bounds = camera2.bounds;
|
|
var bounds = camera2.bounds;
|
|
|
|
|
|
- _this.setViewport(
|
|
|
|
- bounds.x * _width * _pixelRatio, bounds.y * _height * _pixelRatio,
|
|
|
|
- bounds.z * _width * _pixelRatio, bounds.w * _height * _pixelRatio
|
|
|
|
- );
|
|
|
|
- _this.setScissor(
|
|
|
|
- bounds.x * _width * _pixelRatio, bounds.y * _height * _pixelRatio,
|
|
|
|
- bounds.z * _width * _pixelRatio, bounds.w * _height * _pixelRatio
|
|
|
|
- );
|
|
|
|
|
|
+ var x = bounds.x * _width * _pixelRatio;
|
|
|
|
+ var y = bounds.y * _height * _pixelRatio;
|
|
|
|
+ var width = bounds.z * _width * _pixelRatio;
|
|
|
|
+ var height = bounds.w * _height * _pixelRatio;
|
|
|
|
+
|
|
|
|
+ _this.setViewport( x, y, width, height );
|
|
|
|
+ _this.setScissor( x, y, width, height );
|
|
_this.setScissorTest( true );
|
|
_this.setScissorTest( true );
|
|
|
|
|
|
renderObject( object, scene, camera2, geometry, material, group );
|
|
renderObject( object, scene, camera2, geometry, material, group );
|
|
@@ -35993,7 +35996,6 @@ function ArrayCamera( array ) {
|
|
|
|
|
|
PerspectiveCamera.call( this );
|
|
PerspectiveCamera.call( this );
|
|
|
|
|
|
- this.enabled = false;
|
|
|
|
this.cameras = array || [];
|
|
this.cameras = array || [];
|
|
|
|
|
|
}
|
|
}
|
|
@@ -41912,9 +41914,7 @@ var SceneUtils = {
|
|
|
|
|
|
attach: function ( child, scene, parent ) {
|
|
attach: function ( child, scene, parent ) {
|
|
|
|
|
|
- var matrixWorldInverse = new Matrix4();
|
|
|
|
- matrixWorldInverse.getInverse( parent.matrixWorld );
|
|
|
|
- child.applyMatrix( matrixWorldInverse );
|
|
|
|
|
|
+ child.applyMatrix( new Matrix4().getInverse( parent.matrixWorld ) );
|
|
|
|
|
|
scene.remove( child );
|
|
scene.remove( child );
|
|
parent.add( child );
|
|
parent.add( child );
|