Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3.8.5 pipeline, add PipelinePassBuilder #17829

Merged
merged 8 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions cocos/rendering/custom/pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1657,6 +1657,31 @@ export interface Pipeline extends BasicPipeline {
type: string): number;
}

export interface PipelinePassBuilder {
getConfigOrder (): number;
getRenderOrder (): number;
resetCamera? (cameraConfigs: { [name: string]: any }): void;
configCamera? (
camera: Readonly<Camera>,
pplConfigs: { readonly [name: string]: any },
cameraConfigs: { [name: string]: any }): void;
windowResize? (
ppl: BasicPipeline,
pplConfigs: { readonly [name: string]: any },
cameraConfigs: { readonly [name: string]: any },
window: RenderWindow,
camera: Camera,
width: number,
height: number): void;
setup? (
ppl: BasicPipeline,
pplConfigs: { readonly [name: string]: any },
cameraConfigs: { readonly [name: string]: any },
camera: Camera,
context: { [name: string]: any },
prevRenderPass?: BasicRenderPassBuilder): BasicRenderPassBuilder | undefined;
}

/**
* @en Pipeline builder.
* User can implement this interface and setup render graph.
Expand Down
1 change: 1 addition & 0 deletions native/cocos/renderer/pipeline/custom/RenderInterfaceFwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ class RenderPassBuilder;
class MultisampleRenderPassBuilder;
class ComputePassBuilder;
class Pipeline;
class PipelinePassBuilder;
class PipelineBuilder;
class RenderingModule;
class Factory;
Expand Down
13 changes: 13 additions & 0 deletions native/cocos/renderer/pipeline/custom/RenderInterfaceTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,19 @@ class Pipeline : public BasicPipeline {
}
};

class PipelinePassBuilder {
public:
PipelinePassBuilder() noexcept = default;
PipelinePassBuilder(PipelinePassBuilder&& rhs) = delete;
PipelinePassBuilder(PipelinePassBuilder const& rhs) = delete;
PipelinePassBuilder& operator=(PipelinePassBuilder&& rhs) = delete;
PipelinePassBuilder& operator=(PipelinePassBuilder const& rhs) = delete;
virtual ~PipelinePassBuilder() noexcept = default;

virtual uint32_t getConfigOrder() const = 0;
virtual uint32_t getRenderOrder() const = 0;
};

/**
* @en Pipeline builder.
* User can implement this interface and setup render graph.
Expand Down
Loading