add post process culling (#17452)

* add post process culling

* disable post-process by default

* remove post process builder

* cleanup

* backward compatible
This commit is contained in:
hyde zhou
2024-07-30 13:42:05 +08:00
committed by GitHub
parent 3f40ef68ba
commit dda764eb21
12 changed files with 42 additions and 30 deletions
+17 -11
View File
@@ -190,6 +190,20 @@
"custom-pipeline": {
"modules": ["custom-pipeline"],
"dependentAssets": [
"6a2d0734-bd9e-4ddf-946e-caa52498cb75"
]
},
"custom-pipeline-builtin-scripts": {
"modules": [],
"dependentScripts": [
"ff9b0199-ce04-4cfe-86cc-6c719f08d6e4",
"de1c2107-70c8-4021-8459-6399f24d01c6",
"cbf30902-517f-40dc-af90-a550bac27cf1"
]
},
"custom-pipeline-post-process": {
"modules": ["custom-pipeline-post-process"],
"dependentAssets":[
"15049ccd-4dd7-451e-a8ae-af66735c929e",
"521c5f6e-1a26-42e2-8108-4400c912d9bf",
"4c3ce6de-e6d1-47f7-aa36-36b9b58f72d3",
@@ -204,17 +218,9 @@
"45e7c0c8-2699-4912-b45f-d42bb8384189",
"84ac6f69-3086-455a-86a4-561da8ee710b",
"5c601d96-e4c7-4698-991b-7ee674b11079",
"bf0a6d94-58f0-4ad2-bdf2-c4a31c7dd856",
"6a2d0734-bd9e-4ddf-946e-caa52498cb75"
]
},
"custom-pipeline-builtin-scripts": {
"modules": [],
"dependentScripts": [
"ff9b0199-ce04-4cfe-86cc-6c719f08d6e4",
"de1c2107-70c8-4021-8459-6399f24d01c6",
"cbf30902-517f-40dc-af90-a550bac27cf1"
]
"bf0a6d94-58f0-4ad2-bdf2-c4a31c7dd856"
],
"dependentModules": ["custom-pipeline"]
},
"legacy-pipeline": {
"modules": ["legacy-pipeline"],
-8
View File
@@ -26,7 +26,6 @@ declare const render: any;
import { Pipeline, PipelineBuilder, RenderingModule } from './pipeline';
import { Device } from '../../gfx';
import { PostProcessBuilder } from '../post-process/post-process-builder';
import { forceResizeAllWindows } from './framework';
export * from './types';
@@ -61,13 +60,6 @@ export function getCustomPipeline (name: string): PipelineBuilder {
return builder;
}
function addCustomBuiltinPipelines (map: Map<string, PipelineBuilder>) {
map.set('Forward', new PostProcessBuilder());
map.set('Custom', new PostProcessBuilder());
}
addCustomBuiltinPipelines(customPipelineBuilderMap);
export function init (device: Device, arrayBuffer: ArrayBuffer | null) {
if (arrayBuffer) {
_renderModule = render.Factory.init(device, arrayBuffer);
-8
View File
@@ -31,7 +31,6 @@ import { WebProgramLibrary } from './web-program-library';
import { Device } from '../../gfx';
import { initializeLayoutGraphData, terminateLayoutGraphData, getCustomPassID, getCustomPhaseID, getCustomSubpassID } from './layout-graph-utils';
import { ProgramLibrary } from './private';
import { PostProcessBuilder } from '../post-process/post-process-builder';
import { forceResizeAllWindows } from './framework';
let _pipeline: WebPipeline | null = null;
@@ -73,13 +72,6 @@ export function getCustomPipeline (name: string): PipelineBuilder {
return builder;
}
function addCustomBuiltinPipelines (map: Map<string, PipelineBuilder>): void {
map.set('Forward', new PostProcessBuilder());
map.set('Custom', new PostProcessBuilder());
}
addCustomBuiltinPipelines(customPipelineBuilderMap);
export function init (device: Device, arrayBuffer: ArrayBuffer | null): void {
if (arrayBuffer) {
const readBinaryData = new BinaryInputArchive(arrayBuffer);
@@ -1,7 +1,6 @@
import { EDITOR } from 'internal:constants';
import { property, serializable } from '../../../core/data/class-decorator';
import { ccclass, disallowMultiple, executeInEditMode, help, range, slide, tooltip } from '../../../core/data/decorators';
import { Director, director } from '../../../game';
import { Component } from '../../../scene-graph';
import { PostProcessSetting } from './post-process-setting';
+1
View File
@@ -6,4 +6,5 @@ export * from './components';
export * from './passes';
export * from './post-process-builder';
setCustomPipeline('Forward', new PostProcessBuilder());
setCustomPipeline('Custom', new PostProcessBuilder());
@@ -279,6 +279,12 @@
"default": true,
"enginePlugin": false
},
"custom-pipeline-post-process": {
"default": false,
"label": "i18n:ENGINE.features.custom_pipeline_post_process.label",
"description": "i18n:ENGINE.features.custom_pipeline_post_process.description",
"enginePlugin": false
},
"legacy-pipeline": {
"default": false,
"enginePlugin": false
+6
View File
@@ -80,6 +80,9 @@
"custom-pipeline": {
"$ref": "#/definitions/IFeatureItem"
},
"custom-pipeline-post-process": {
"$ref": "#/definitions/IFeatureItem"
},
"legacy-pipeline": {
"$ref": "#/definitions/IFeatureItem"
},
@@ -260,6 +263,9 @@
"custom-pipeline": {
"$ref": "#/definitions/BaseItem"
},
"custom-pipeline-post-process": {
"$ref": "#/definitions/BaseItem"
},
"legacy-pipeline": {
"$ref": "#/definitions/BaseItem"
},
+4
View File
@@ -1108,6 +1108,10 @@ module.exports = link(mixin({
label: "Custom Render Pipeline (Beta)",
description: "Enable custom render pipeline",
},
custom_pipeline_post_process: {
label: "Custom Render Pipeline Post Process (Deprecated)",
description: "Enable custom render pipeline post process",
},
legacy_pipeline: {
label: "Legacy Render Pipeline (Deprecated)",
description: "Enable legacy render pipeline",
+4
View File
@@ -1083,6 +1083,10 @@ module.exports = link(mixin({
label: "自定义渲染管线 (Beta)",
description: "启用自定义渲染管线。",
},
custom_pipeline_post_process: {
label: "自定义渲染管线的后处理模块 (Deprecated)",
description: "启用自定义渲染管线的后处理模块",
},
legacy_pipeline: {
label: "废弃渲染管线 (Deprecated)",
description: "启用废弃渲染管线。",
+3
View File
@@ -0,0 +1,3 @@
import * as postProcess from '../cocos/rendering/post-process';
export { postProcess };
-2
View File
@@ -1,8 +1,6 @@
import { legacyCC } from '../cocos/core/global-exports';
import * as rendering from '../cocos/rendering/custom';
import * as postProcess from '../cocos/rendering/post-process';
export { rendering };
export { postProcess };
legacyCC.rendering = rendering;
+1
View File
@@ -6,6 +6,7 @@ export * from './exports/animation';
export * from './exports/audio';
export * from './exports/base';
export * from './exports/custom-pipeline';
export * from './exports/custom-pipeline-post-process';
export * from './exports/legacy-pipeline';
export * from './exports/dragon-bones';
export * from './exports/geometry-renderer';