Skip to content

Commit 0a26b68

Browse files
committed
update
1 parent e3b5c23 commit 0a26b68

File tree

1 file changed

+20
-29
lines changed

1 file changed

+20
-29
lines changed

cocos/rendering/custom/web-pipeline.ts

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,25 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild
303303
}
304304
const passOrSubpassId = this._renderGraph.getParent(this._vertID);
305305
if (sceneFlags & SceneFlags.UI) {
306-
this.addDraw2D(camera);
306+
const queueId = this._renderGraph.addVertex<RenderGraphValue.Queue>(
307+
RenderGraphValue.Queue,
308+
this._queue,
309+
'UI Queue',
310+
'default',
311+
this._data,
312+
!DEBUG,
313+
passOrSubpassId,
314+
);
315+
316+
this._renderGraph.addVertex<RenderGraphValue.Blit>(
317+
RenderGraphValue.Blit,
318+
renderGraphPool.createBlit(emptyMaterial, this._renderGraph.N, SceneFlags.NONE, camera, BlitType.DRAW_2D),
319+
'UI',
320+
'',
321+
emptyRenderData,
322+
!DEBUG,
323+
queueId,
324+
);
307325
}
308326
if (sceneFlags & SceneFlags.PROFILER) {
309327
let showStatistics = false;
@@ -407,33 +425,14 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild
407425
}
408426
}
409427
addDraw2D (camera: Camera): void {
410-
const passOrSubpassId = this._renderGraph.getParent(this._vertID);
411-
const passLayoutId = this._lg.locateChild(
412-
this._lg.N,
413-
'default',
414-
);
415-
const phaseLayoutId = this._lg.locateChild(
416-
passLayoutId,
417-
'default',
418-
);
419-
const queueId = this._renderGraph.addVertex<RenderGraphValue.Queue>(
420-
RenderGraphValue.Queue,
421-
this._queue,
422-
'UI Queue',
423-
'default',
424-
this._data,
425-
!DEBUG,
426-
passOrSubpassId,
427-
);
428-
429428
this._renderGraph.addVertex<RenderGraphValue.Blit>(
430429
RenderGraphValue.Blit,
431430
renderGraphPool.createBlit(emptyMaterial, this._renderGraph.N, SceneFlags.NONE, camera, BlitType.DRAW_2D),
432431
'Draw2D',
433432
'',
434433
emptyRenderData,
435434
!DEBUG,
436-
queueId,
435+
this._vertID,
437436
);
438437
}
439438
addProfiler (camera: Camera): void {
@@ -447,14 +446,6 @@ export class WebRenderQueueBuilder extends WebSetter implements RenderQueueBuild
447446
!DEBUG,
448447
this._vertID,
449448
);
450-
const passLayoutId = this._lg.locateChild(
451-
this._lg.N,
452-
'default',
453-
);
454-
const phaseLayoutId = this._lg.locateChild(
455-
passLayoutId,
456-
'default',
457-
);
458449
const queueId = this._renderGraph.addVertex<RenderGraphValue.Queue>(
459450
RenderGraphValue.Queue,
460451
this._queue,

0 commit comments

Comments
 (0)