Răsfoiți Sursa

Revert "WebGPU Bloom Examples: Clean up" (#29214)

This reverts commit ca277a8eaf3caa893d2f0065724f9c71ccd87942.
Michael Herzog 1 an în urmă
părinte
comite
db4f726584

+ 3 - 5
examples/webgpu_postprocessing_bloom.html

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

+ 2 - 5
examples/webgpu_postprocessing_bloom_selective.html

@@ -74,22 +74,19 @@
 
 			// 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号