Skip to content

Commit d3ffec9

Browse files
authored
WebGPURenderer: Rename PostProcessing to RenderPipeline (mrdoob#32789)
1 parent 176519f commit d3ffec9

File tree

61 files changed

+505
-475
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+505
-475
lines changed

examples/jsm/tsl/display/BloomNode.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ let _rendererState;
1212
/**
1313
* Post processing node for creating a bloom effect.
1414
* ```js
15-
* const postProcessing = new THREE.PostProcessing( renderer );
15+
* const renderPipeline = new THREE.RenderPipeline( renderer );
1616
*
1717
* const scenePass = pass( scene, camera );
1818
* const scenePassColor = scenePass.getTextureNode( 'output' );
1919
*
2020
* const bloomPass = bloom( scenePassColor );
2121
*
22-
* postProcessing.outputNode = scenePassColor.add( bloomPass );
22+
* renderPipeline.outputNode = scenePassColor.add( bloomPass );
2323
* ```
2424
* By default, the node affects the entire image. For a selective bloom,
2525
* use the `emissive` material property to control which objects should
2626
* contribute to bloom or not. This can be achieved via MRT.
2727
* ```js
28-
* const postProcessing = new THREE.PostProcessing( renderer );
28+
* const renderPipeline = new THREE.RenderPipeline( renderer );
2929
*
3030
* const scenePass = pass( scene, camera );
3131
* scenePass.setMRT( mrt( {
@@ -37,7 +37,7 @@ let _rendererState;
3737
* const emissivePass = scenePass.getTextureNode( 'emissive' );
3838
*
3939
* const bloomPass = bloom( emissivePass );
40-
* postProcessing.outputNode = scenePassColor.add( bloomPass );
40+
* renderPipeline.outputNode = scenePassColor.add( bloomPass );
4141
* ```
4242
* @augments TempNode
4343
* @three_import import { bloom } from 'three/addons/tsl/display/BloomNode.js';

examples/jsm/tsl/display/GTAONode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ let _rendererState;
1212
/**
1313
* Post processing node for applying Ground Truth Ambient Occlusion (GTAO) to a scene.
1414
* ```js
15-
* const postProcessing = new THREE.PostProcessing( renderer );
15+
* const renderPipeline = new THREE.RenderPipeline( renderer );
1616
*
1717
* const scenePass = pass( scene, camera );
1818
* scenePass.setMRT( mrt( {
@@ -26,7 +26,7 @@ let _rendererState;
2626
*
2727
* const aoPass = ao( scenePassDepth, scenePassNormal, camera );
2828
*
29-
* postProcessing.outputNod = aoPass.getTextureNode().mul( scenePassColor );
29+
* renderPipeline.outputNode = aoPass.getTextureNode().mul( scenePassColor );
3030
* ```
3131
*
3232
* Reference: [Practical Real-Time Strategies for Accurate Indirect Occlusion](https://www.activision.com/cdn/research/Practical_Real_Time_Strategies_for_Accurate_Indirect_Occlusion_NEW%20VERSION_COLOR.pdf).

examples/jsm/tsl/display/OutlineNode.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let _rendererState;
1313
* gives you great flexibility in composing the final outline look depending on
1414
* your requirements.
1515
* ```js
16-
* const postProcessing = new THREE.PostProcessing( renderer );
16+
* const renderPipeline = new THREE.RenderPipeline( renderer );
1717
*
1818
* const scenePass = pass( scene, camera );
1919
*
@@ -36,7 +36,7 @@ let _rendererState;
3636
* const { visibleEdge, hiddenEdge } = outlinePass;
3737
* const outlineColor = visibleEdge.mul( visibleEdgeColor ).add( hiddenEdge.mul( hiddenEdgeColor ) ).mul( edgeStrength );
3838
*
39-
* postProcessing.outputNode = outlineColor.add( scenePass );
39+
* renderPipeline.outputNode = outlineColor.add( scenePass );
4040
* ```
4141
*
4242
* @augments TempNode

examples/jsm/tsl/display/TRAANode.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -434,20 +434,20 @@ class TRAANode extends TempNode {
434434
*/
435435
setup( builder ) {
436436

437-
const postProcessing = builder.context.postProcessing;
437+
const renderPipeline = builder.context.renderPipeline;
438438

439-
if ( postProcessing ) {
439+
if ( renderPipeline ) {
440440

441441
this._needsPostProcessingSync = true;
442442

443-
postProcessing.context.onBeforePostProcessing = () => {
443+
renderPipeline.context.onBeforeRenderPipeline = () => {
444444

445445
const size = builder.renderer.getDrawingBufferSize( _size );
446446
this.setViewOffset( size.width, size.height );
447447

448448
};
449449

450-
postProcessing.context.onAfterPostProcessing = () => {
450+
renderPipeline.context.onAfterRenderPipeline = () => {
451451

452452
this.clearViewOffset();
453453

examples/misc_controls_fly.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
let geometry, meshPlanet, meshClouds, meshMoon;
6363
let dirLight;
6464

65-
let postProcessing;
65+
let renderPipeline;
6666

6767
const textureLoader = new THREE.TextureLoader();
6868

@@ -219,12 +219,12 @@
219219

220220
// postprocessing
221221

222-
postProcessing = new THREE.PostProcessing( renderer );
222+
renderPipeline = new THREE.RenderPipeline( renderer );
223223

224224
const scenePass = pass( scene, camera );
225225
const scenePassColor = scenePass.getTextureNode();
226226

227-
postProcessing.outputNode = film( scenePassColor );
227+
renderPipeline.outputNode = film( scenePassColor );
228228

229229
}
230230

@@ -278,7 +278,7 @@
278278
controls.movementSpeed = 0.33 * d;
279279
controls.update( delta );
280280

281-
postProcessing.render();
281+
renderPipeline.render();
282282

283283
}
284284

examples/webgpu_backdrop_water.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
let camera, scene, renderer;
4545
let mixer, objects, timer;
4646
let model, floor, floorPosition;
47-
let postProcessing;
47+
let renderPipeline;
4848
let controls;
4949

5050
init();
@@ -221,8 +221,8 @@
221221

222222
const vignette = screenUV.distance( .5 ).mul( 1.35 ).clamp().oneMinus().toInspector( 'Post-Processing / Vignette' );
223223

224-
postProcessing = new THREE.PostProcessing( renderer );
225-
postProcessing.outputNode = waterMask.select( scenePassColorBlurred, scenePassColorBlurred.mul( color( 0x74ccf4 ) ).mul( vignette ) );
224+
renderPipeline = new THREE.RenderPipeline( renderer );
225+
renderPipeline.outputNode = waterMask.select( scenePassColorBlurred, scenePassColorBlurred.mul( color( 0x74ccf4 ) ).mul( vignette ) );
226226

227227
//
228228

@@ -264,7 +264,7 @@
264264

265265
}
266266

267-
postProcessing.render();
267+
renderPipeline.render();
268268

269269
}
270270

examples/webgpu_compute_particles_snow.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
let camera, scene, renderer;
5050
let controls;
5151
let computeParticles;
52-
let postProcessing;
52+
let renderPipeline;
5353

5454
let collisionCamera, collisionPosRT, collisionPosMaterial;
5555

@@ -309,8 +309,8 @@
309309
totalPass = totalPass.mul( vignette );
310310
totalPass = totalPass.add( teapotTreePass.mul( 10 ).add( teapotTreePassBlurred ).toInspector( 'Teapot Blur' ) );
311311

312-
postProcessing = new THREE.PostProcessing( renderer );
313-
postProcessing.outputNode = totalPass;
312+
renderPipeline = new THREE.RenderPipeline( renderer );
313+
renderPipeline.outputNode = totalPass;
314314

315315
//
316316

@@ -354,7 +354,7 @@
354354
scene.overrideMaterial = null;
355355
renderer.setRenderTarget( null );
356356

357-
postProcessing.render();
357+
renderPipeline.render();
358358

359359
}
360360

examples/webgpu_custom_fog_background.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
4545

4646
let camera, scene, renderer;
47-
let postProcessing;
47+
let renderPipeline;
4848

4949
init();
5050

@@ -81,9 +81,9 @@
8181
// mix fog using fog factor and fog color
8282
const compose = fogFactor.mix( scenePassTM, fogColor );
8383

84-
postProcessing = new THREE.PostProcessing( renderer );
85-
postProcessing.outputColorTransform = true; // no tone mapping will be applied, only the default color space transform
86-
postProcessing.outputNode = compose;
84+
renderPipeline = new THREE.RenderPipeline( renderer );
85+
renderPipeline.outputColorTransform = true; // no tone mapping will be applied, only the default color space transform
86+
renderPipeline.outputNode = compose;
8787

8888
//
8989

@@ -130,7 +130,7 @@
130130

131131
function animate() {
132132

133-
postProcessing.render();
133+
renderPipeline.render();
134134

135135
}
136136

examples/webgpu_custom_fog_scattering.html

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
4141
import { Inspector } from 'three/addons/inspector/Inspector.js';
4242

43-
let camera, scene, renderer, postProcessing, controls;
43+
let camera, scene, renderer, renderPipeline, controls;
4444

4545
const params = {
4646
scatteringEnabled: true
@@ -134,7 +134,7 @@
134134

135135
//
136136

137-
postProcessing = new THREE.PostProcessing( renderer );
137+
renderPipeline = new THREE.RenderPipeline( renderer );
138138

139139
// uniforms
140140

@@ -158,7 +158,7 @@
158158

159159
const compositeNode = mix( scenePassColor, sceneColorBlurred, fogFactor );
160160

161-
postProcessing.outputNode = compositeNode;
161+
renderPipeline.outputNode = compositeNode;
162162

163163
// gui
164164

@@ -173,15 +173,15 @@
173173

174174
if ( value === true ) {
175175

176-
postProcessing.outputNode = compositeNode;
176+
renderPipeline.outputNode = compositeNode;
177177

178178
} else {
179179

180-
postProcessing.outputNode = scenePassColor;
180+
renderPipeline.outputNode = scenePassColor;
181181

182182
}
183183

184-
postProcessing.needsUpdate = true;
184+
renderPipeline.needsUpdate = true;
185185

186186
} );
187187

@@ -202,7 +202,7 @@
202202

203203
controls.update();
204204

205-
postProcessing.render();
205+
renderPipeline.render();
206206

207207
}
208208

examples/webgpu_display_stereo.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
import { OrbitControls } from 'three/addons/controls/OrbitControls.js';
4242
import { Inspector } from 'three/addons/inspector/Inspector.js';
4343

44-
let camera, scene, renderer, postProcessing;
44+
let camera, scene, renderer, renderPipeline;
4545

4646
let stereo, anaglyph, parallaxBarrier;
4747

@@ -108,12 +108,12 @@
108108
renderer.inspector = new Inspector();
109109
document.body.appendChild( renderer.domElement );
110110

111-
postProcessing = new THREE.PostProcessing( renderer );
111+
renderPipeline = new THREE.RenderPipeline( renderer );
112112
stereo = stereoPass( scene, camera );
113113
anaglyph = anaglyphPass( scene, camera );
114114
parallaxBarrier = parallaxBarrierPass( scene, camera );
115115

116-
postProcessing.outputNode = stereo;
116+
renderPipeline.outputNode = stereo;
117117

118118
const gui = renderer.inspector.createParameters( 'Stereo Settings' );
119119
gui.add( params, 'effect', effects ).onChange( update );
@@ -138,19 +138,19 @@
138138

139139
if ( value === 'stereo' ) {
140140

141-
postProcessing.outputNode = stereo;
141+
renderPipeline.outputNode = stereo;
142142

143143
} else if ( value === 'anaglyph' ) {
144144

145-
postProcessing.outputNode = anaglyph;
145+
renderPipeline.outputNode = anaglyph;
146146

147147
} else if ( value === 'parallaxBarrier' ) {
148148

149-
postProcessing.outputNode = parallaxBarrier;
149+
renderPipeline.outputNode = parallaxBarrier;
150150

151151
}
152152

153-
postProcessing.needsUpdate = true;
153+
renderPipeline.needsUpdate = true;
154154

155155
}
156156

@@ -194,7 +194,7 @@
194194

195195
}
196196

197-
postProcessing.render();
197+
renderPipeline.render();
198198

199199
}
200200

0 commit comments

Comments
 (0)