Browse Source

DataTexture: Removed unneeded needsUpdate sets.

Mr.doob 5 years ago
parent
commit
d3a37f37d3

+ 0 - 4
examples/js/lights/RectAreaLightUniformsLib.js

@@ -30,12 +30,8 @@ THREE.RectAreaLightUniformsLib = {
 		// data textures
 
 		var ltc_1 = new THREE.DataTexture( new Float32Array( LTC_MAT_1 ), 64, 64, THREE.RGBAFormat, THREE.FloatType, THREE.UVMapping, THREE.ClampToEdgeWrapping, THREE.ClampToEdgeWrapping, THREE.LinearFilter, THREE.NearestFilter, 1 );
-
 		var ltc_2 = new THREE.DataTexture( new Float32Array( LTC_MAT_2 ), 64, 64, THREE.RGBAFormat, THREE.FloatType, THREE.UVMapping, THREE.ClampToEdgeWrapping, THREE.ClampToEdgeWrapping, THREE.LinearFilter, THREE.NearestFilter, 1 );
 
-		ltc_1.needsUpdate = true;
-		ltc_2.needsUpdate = true;
-
 		THREE.UniformsLib.LTC_1 = ltc_1;
 		THREE.UniformsLib.LTC_2 = ltc_2;
 

+ 2 - 5
examples/js/misc/GPUComputationRenderer.js

@@ -318,11 +318,8 @@ THREE.GPUComputationRenderer = function ( sizeX, sizeY, renderer ) {
 
 	this.createTexture = function () {
 
-		var a = new Float32Array( sizeX * sizeY * 4 );
-		var texture = new THREE.DataTexture( a, sizeX, sizeY, THREE.RGBAFormat, THREE.FloatType );
-		texture.needsUpdate = true;
-
-		return texture;
+		var data = new Float32Array( sizeX * sizeY * 4 );
+		return new THREE.DataTexture( data, sizeX, sizeY, THREE.RGBAFormat, THREE.FloatType );
 
 	};
 

+ 0 - 1
examples/js/misc/Ocean.js

@@ -255,7 +255,6 @@ THREE.Ocean.prototype.generateSeedPhaseTexture = function () {
 	this.pingPhaseTexture.wrapS = THREE.ClampToEdgeWrapping;
 	this.pingPhaseTexture.wrapT = THREE.ClampToEdgeWrapping;
 	this.pingPhaseTexture.type = THREE.FloatType;
-	this.pingPhaseTexture.needsUpdate = true;
 
 };
 

+ 0 - 2
examples/js/objects/Lensflare.js

@@ -23,14 +23,12 @@ THREE.Lensflare = function () {
 	tempMap.magFilter = THREE.NearestFilter;
 	tempMap.wrapS = THREE.ClampToEdgeWrapping;
 	tempMap.wrapT = THREE.ClampToEdgeWrapping;
-	tempMap.needsUpdate = true;
 
 	var occlusionMap = new THREE.DataTexture( new Uint8Array( 16 * 16 * 3 ), 16, 16, THREE.RGBFormat );
 	occlusionMap.minFilter = THREE.NearestFilter;
 	occlusionMap.magFilter = THREE.NearestFilter;
 	occlusionMap.wrapS = THREE.ClampToEdgeWrapping;
 	occlusionMap.wrapT = THREE.ClampToEdgeWrapping;
-	occlusionMap.needsUpdate = true;
 
 	// material
 

+ 1 - 3
examples/js/postprocessing/GlitchPass.js

@@ -104,9 +104,7 @@ THREE.GlitchPass.prototype = Object.assign( Object.create( THREE.Pass.prototype
 
 		}
 
-		var texture = new THREE.DataTexture( data_arr, dt_size, dt_size, THREE.RGBFormat, THREE.FloatType );
-		texture.needsUpdate = true;
-		return texture;
+		return new THREE.DataTexture( data_arr, dt_size, dt_size, THREE.RGBFormat, THREE.FloatType );
 
 	}
 

+ 0 - 1
examples/js/postprocessing/SSAOPass.js

@@ -388,7 +388,6 @@ THREE.SSAOPass.prototype = Object.assign( Object.create( THREE.Pass.prototype ),
 		this.noiseTexture = new THREE.DataTexture( data, width, height, THREE.RGBAFormat, THREE.FloatType );
 		this.noiseTexture.wrapS = THREE.RepeatWrapping;
 		this.noiseTexture.wrapT = THREE.RepeatWrapping;
-		this.noiseTexture.needsUpdate = true;
 
 	}
 

+ 0 - 3
examples/webgl2_materials_texture2darray.html

@@ -99,12 +99,9 @@
 						var array = zip.files[ 'head256x256x109' ].asUint8Array();
 
 						var texture = new THREE.DataTexture2DArray( array, 256, 256, 109 );
-
 						texture.format = THREE.RedFormat;
 						texture.type = THREE.UnsignedByteType;
 
-						texture.needsUpdate = true;
-
 						var material = new THREE.ShaderMaterial( {
 							uniforms: {
 								diffuse: { value: texture },

+ 0 - 1
examples/webgl2_materials_texture3d.html

@@ -91,7 +91,6 @@
 				texture.type = THREE.FloatType;
 				texture.minFilter = texture.magFilter = THREE.LinearFilter;
 				texture.unpackAlignment = 1;
-				texture.needsUpdate = true;
 
 				// Colormap textures
 				cmtextures = {

+ 0 - 1
examples/webgl_framebuffer_texture.html

@@ -94,7 +94,6 @@
 				texture = new THREE.DataTexture( data, textureSize, textureSize, THREE.RGBFormat );
 				texture.minFilter = THREE.NearestFilter;
 				texture.magFilter = THREE.NearestFilter;
-				texture.needsUpdate = true;
 
 				//
 

+ 0 - 1
src/renderers/WebGLRenderer.js

@@ -1812,7 +1812,6 @@ function WebGLRenderer( parameters ) {
 						boneMatrices.set( skeleton.boneMatrices ); // copy current values
 
 						var boneTexture = new DataTexture( boneMatrices, size, size, RGBAFormat, FloatType );
-						boneTexture.needsUpdate = true;
 
 						skeleton.boneMatrices = boneMatrices;
 						skeleton.boneTexture = boneTexture;