From c54fe3f1b6abe3db8450ed189bd1e00393384a26 Mon Sep 17 00:00:00 2001 From: Zhou Zhenglong Date: Fri, 8 Nov 2024 15:16:26 +0800 Subject: [PATCH] remove add PassBuilder --- cocos/rendering/custom/framework.ts | 21 ------------------- cocos/rendering/custom/pipeline.ts | 3 +-- .../pipeline/custom/RenderInterfaceTypes.h | 2 -- 3 files changed, 1 insertion(+), 25 deletions(-) diff --git a/cocos/rendering/custom/framework.ts b/cocos/rendering/custom/framework.ts index 9f0e72b69a5..15619fc8085 100644 --- a/cocos/rendering/custom/framework.ts +++ b/cocos/rendering/custom/framework.ts @@ -27,7 +27,6 @@ import { Camera } from '../../render-scene/scene/camera'; import { RenderWindow } from '../../render-scene/core/render-window'; import { supportsR32FloatTexture } from '../define'; import { Format } from '../../gfx/base/define'; -import { cclegacy, macro } from '../../core'; export { packRGBE } from '../../core/math/color'; @@ -103,23 +102,3 @@ export function dispatchResizeEvents (cameras: Camera[], builder: PipelineBuilde // For editor preview forceResize = false; } - -let sBuilder: PipelineBuilder; - -export function addPipelinePassBuilder (camera: Camera, passBuilder: PipelinePassBuilder): void { - if (!sBuilder) { - sBuilder = cclegacy.rendering.getCustomPipeline(macro.CUSTOM_PIPELINE_NAME); - } - if (sBuilder.addPipelinePassBuilder) { - sBuilder.addPipelinePassBuilder(camera, passBuilder); - } -} - -export function removePipelinePassBuilder (camera: Camera, passBuilder: PipelinePassBuilder): void { - if (!sBuilder) { - sBuilder = cclegacy.rendering.getCustomPipeline(macro.CUSTOM_PIPELINE_NAME); - } - if (sBuilder.removePipelinePassBuilder) { - sBuilder.removePipelinePassBuilder(camera, passBuilder); - } -} diff --git a/cocos/rendering/custom/pipeline.ts b/cocos/rendering/custom/pipeline.ts index 6917fefcaa5..b2fb592896b 100644 --- a/cocos/rendering/custom/pipeline.ts +++ b/cocos/rendering/custom/pipeline.ts @@ -1660,6 +1660,7 @@ export interface Pipeline extends BasicPipeline { export interface PipelinePassBuilder { getConfigOrder (): number; getRenderOrder (): number; + resetCamera? (cameraConfigs: { [name: string]: any }): void; configCamera? ( camera: Readonly, pplConfigs: { readonly [name: string]: any }, @@ -1708,8 +1709,6 @@ export interface PipelineBuilder { * @zh 渲染管线状态更新的回调 */ onGlobalPipelineStateChanged? (): void; - addPipelinePassBuilder? (camera: Camera, passBuilder: PipelinePassBuilder): void; - removePipelinePassBuilder? (camera: Camera, passBuilder: PipelinePassBuilder): void; } /** diff --git a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h index 64f047e6924..007593bf036 100644 --- a/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h +++ b/native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h @@ -1787,8 +1787,6 @@ class PipelineBuilder { * @zh 渲染管线状态更新的回调 */ virtual void onGlobalPipelineStateChanged() = 0; - virtual void addPipelinePassBuilder(scene::Camera *camera, PipelinePassBuilder *passBuilder) = 0; - virtual void removePipelinePassBuilder(scene::Camera *camera, PipelinePassBuilder *passBuilder) = 0; }; /**