Mugen87 2 éve
szülő
commit
25859b6bdf
5 módosított fájl, 45 hozzáadás és 3 törlés
  1. 15 1
      build/three.cjs
  2. 15 1
      build/three.js
  3. 0 0
      build/three.min.js
  4. 15 1
      build/three.module.js
  5. 0 0
      build/three.module.min.js

+ 15 - 1
build/three.cjs

@@ -21548,6 +21548,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 	this.needsUpdate = false;
 
 	this.type = PCFShadowMap;
+	let _previousType = this.type;
 
 	this.render = function ( lights, scene, camera ) {
 
@@ -21568,6 +21569,11 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 		_state.buffers.depth.setTest( true );
 		_state.setScissorTest( false );
 
+		// check for shadow map type changes
+
+		const toVSM = ( _previousType !== VSMShadowMap && this.type === VSMShadowMap );
+		const fromVSM = ( _previousType === VSMShadowMap && this.type !== VSMShadowMap );
+
 		// render depth map
 
 		for ( let i = 0, il = lights.length; i < il; i ++ ) {
@@ -21612,10 +21618,16 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 
 			}
 
-			if ( shadow.map === null ) {
+			if ( shadow.map === null || toVSM === true || fromVSM === true ) {
 
 				const pars = ( this.type !== VSMShadowMap ) ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};
 
+				if ( shadow.map !== null ) {
+
+					shadow.map.dispose();
+
+				}
+
 				shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
 				shadow.map.texture.name = light.name + '.shadowMap';
 
@@ -21661,6 +21673,8 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 
 		}
 
+		_previousType = this.type;
+
 		scope.needsUpdate = false;
 
 		_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );

+ 15 - 1
build/three.js

@@ -21553,6 +21553,7 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 		this.needsUpdate = false;
 
 		this.type = PCFShadowMap;
+		let _previousType = this.type;
 
 		this.render = function ( lights, scene, camera ) {
 
@@ -21573,6 +21574,11 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 			_state.buffers.depth.setTest( true );
 			_state.setScissorTest( false );
 
+			// check for shadow map type changes
+
+			const toVSM = ( _previousType !== VSMShadowMap && this.type === VSMShadowMap );
+			const fromVSM = ( _previousType === VSMShadowMap && this.type !== VSMShadowMap );
+
 			// render depth map
 
 			for ( let i = 0, il = lights.length; i < il; i ++ ) {
@@ -21617,10 +21623,16 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 				}
 
-				if ( shadow.map === null ) {
+				if ( shadow.map === null || toVSM === true || fromVSM === true ) {
 
 					const pars = ( this.type !== VSMShadowMap ) ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};
 
+					if ( shadow.map !== null ) {
+
+						shadow.map.dispose();
+
+					}
+
 					shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
 					shadow.map.texture.name = light.name + '.shadowMap';
 
@@ -21666,6 +21678,8 @@ console.warn( 'Scripts "build/three.js" and "build/three.min.js" are deprecated
 
 			}
 
+			_previousType = this.type;
+
 			scope.needsUpdate = false;
 
 			_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
build/three.min.js


+ 15 - 1
build/three.module.js

@@ -21546,6 +21546,7 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 	this.needsUpdate = false;
 
 	this.type = PCFShadowMap;
+	let _previousType = this.type;
 
 	this.render = function ( lights, scene, camera ) {
 
@@ -21566,6 +21567,11 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 		_state.buffers.depth.setTest( true );
 		_state.setScissorTest( false );
 
+		// check for shadow map type changes
+
+		const toVSM = ( _previousType !== VSMShadowMap && this.type === VSMShadowMap );
+		const fromVSM = ( _previousType === VSMShadowMap && this.type !== VSMShadowMap );
+
 		// render depth map
 
 		for ( let i = 0, il = lights.length; i < il; i ++ ) {
@@ -21610,10 +21616,16 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 
 			}
 
-			if ( shadow.map === null ) {
+			if ( shadow.map === null || toVSM === true || fromVSM === true ) {
 
 				const pars = ( this.type !== VSMShadowMap ) ? { minFilter: NearestFilter, magFilter: NearestFilter } : {};
 
+				if ( shadow.map !== null ) {
+
+					shadow.map.dispose();
+
+				}
+
 				shadow.map = new WebGLRenderTarget( _shadowMapSize.x, _shadowMapSize.y, pars );
 				shadow.map.texture.name = light.name + '.shadowMap';
 
@@ -21659,6 +21671,8 @@ function WebGLShadowMap( _renderer, _objects, _capabilities ) {
 
 		}
 
+		_previousType = this.type;
+
 		scope.needsUpdate = false;
 
 		_renderer.setRenderTarget( currentRenderTarget, activeCubeFace, activeMipmapLevel );

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
build/three.module.min.js


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott