Browse Source

Merge pull request #20645 from gonnavis/webgl_gpgpu_birds_gltf_size

Fix examples/webgl_gpgpu_birds_gltf.html blue scene wrong initial size.
Mr.doob 4 years ago
parent
commit
828b82807b

BIN
examples/screenshots/webgl_gpgpu_birds_gltf.jpg


+ 3 - 3
examples/webgl_gpgpu_birds_gltf.html

@@ -422,7 +422,7 @@
 				gui.add( effectController, "count", 0, BIRDS, 1 ).onChange( valuesChanger );
 				gui.close();
 
-				initBirds();
+				initBirds(effectController);
 
 			}
 
@@ -483,7 +483,7 @@
 
 			}
 
-			function initBirds() {
+			function initBirds(effectController) {
 
 				const geometry = BirdGeometry;
 
@@ -500,7 +500,7 @@
 					shader.uniforms.textureVelocity = { value: null };
 					shader.uniforms.textureAnimation = { value: textureAnimation };
 					shader.uniforms.time = { value: 1.0 };
-					shader.uniforms.size = { value: 0.1 };
+					shader.uniforms.size = { value: effectController.size };
 					shader.uniforms.delta = { value: 0.0 };
 
 					let token = '#define STANDARD';