Преглед изворни кода

WebGPU Bloom Examples: Clean up

WestLangley пре 1 година
родитељ
комит
ca277a8eaf

+ 5 - 3
examples/webgpu_postprocessing_bloom.html

@@ -97,13 +97,15 @@
 				//
 
 				postProcessing = new THREE.PostProcessing( renderer );
+				postProcessing.outputColorTransform = false;
 
 				const scenePass = pass( scene, camera );
-				const scenePassColor = scenePass.getTextureNode( 'output' );
 
-				const bloomPass = bloom( scenePassColor );
+				const outputPass = scenePass.getTextureNode();
 
-				postProcessing.outputNode = scenePassColor.add( bloomPass );
+				const bloomPass = outputPass.bloom();
+
+				postProcessing.outputNode = outputPass.add( bloomPass ).renderOutput();
 
 				//
 

+ 5 - 2
examples/webgpu_postprocessing_bloom_selective.html

@@ -74,19 +74,22 @@
 
 			// post processing
 
+			const postProcessing = new THREE.PostProcessing( renderer );
+			postProcessing.outputColorTransform = false;
+
 			const scenePass = pass( scene, camera );
+
 			scenePass.setMRT( mrt( {
 				output,
 				bloomIntensity: float( 0 ) // default bloom intensity
 			} ) );
 
 			const outputPass = scenePass.getTextureNode();
+
 			const bloomIntensityPass = scenePass.getTextureNode( 'bloomIntensity' );
 
 			const bloomPass = outputPass.mul( bloomIntensityPass ).bloom();
 
-			const postProcessing = new THREE.PostProcessing( renderer );
-			postProcessing.outputColorTransform = false;
 			postProcessing.outputNode = outputPass.add( bloomPass ).renderOutput();
 
 			// controls

粤ICP备19079148号