|
|
|
@@ -25,34 +25,71 @@
|
|
|
|
|
declare const nr: any;
|
|
|
|
|
declare const jsb: any;
|
|
|
|
|
|
|
|
|
|
import { getPhaseID } from './pass-phase';
|
|
|
|
|
import { ccenum, CCString, js } from '../core';
|
|
|
|
|
import * as pipeline from './define';
|
|
|
|
|
import { ccclass, serializable, editable, type } from '../core/data/class-decorator';
|
|
|
|
|
import { legacyCC } from '../core/global-exports';
|
|
|
|
|
import * as decors from '../native-binding/decorators';
|
|
|
|
|
import { RenderTexture } from '../asset/assets/render-texture';
|
|
|
|
|
import type {
|
|
|
|
|
RenderPipeline as NrRenderPipeline,
|
|
|
|
|
RenderFlow as NrRenderFlow,
|
|
|
|
|
RenderStage as NrRenderStage,
|
|
|
|
|
InstancedBuffer as NrInstancedBuffer,
|
|
|
|
|
PipelineStateManager as NrPipelineStateManager,
|
|
|
|
|
ForwardPipeline as NrForwardPipeline,
|
|
|
|
|
ForwardFlow as NrForwardFlow,
|
|
|
|
|
ShadowFlow as NrShadowFlow,
|
|
|
|
|
ForwardStage as NrForwardStage,
|
|
|
|
|
ShadowStage as NrShadowStage,
|
|
|
|
|
DeferredPipeline as NrDeferredPipeline,
|
|
|
|
|
MainFlow as NrMainFlow,
|
|
|
|
|
LightingStage as NrLightingStage,
|
|
|
|
|
PostProcessStage as NrPostProcessStage,
|
|
|
|
|
GbufferStage as NrGbufferStage,
|
|
|
|
|
BloomStage as NrBloomStage,
|
|
|
|
|
ReflectionProbeFlow as NrReflectionProbeFlow,
|
|
|
|
|
ReflectionProbeStage as NrReflectionProbeStage,
|
|
|
|
|
} from './index';
|
|
|
|
|
|
|
|
|
|
export { pipeline };
|
|
|
|
|
|
|
|
|
|
nr.getPhaseID = getPhaseID;
|
|
|
|
|
|
|
|
|
|
export const RenderPipeline = nr.RenderPipeline;
|
|
|
|
|
export const RenderFlow = nr.RenderFlow;
|
|
|
|
|
export const RenderStage = nr.RenderStage;
|
|
|
|
|
export const InstancedBuffer = nr.InstancedBuffer;
|
|
|
|
|
export const PipelineStateManager = nr.PipelineStateManager;
|
|
|
|
|
export const ForwardPipeline = nr.ForwardPipeline;
|
|
|
|
|
export const ForwardFlow = nr.ForwardFlow;
|
|
|
|
|
export const ShadowFlow = nr.ShadowFlow;
|
|
|
|
|
export const ForwardStage = nr.ForwardStage;
|
|
|
|
|
export const ShadowStage = nr.ShadowStage;
|
|
|
|
|
export const DeferredPipeline = nr.DeferredPipeline;
|
|
|
|
|
export const MainFlow = nr.MainFlow;
|
|
|
|
|
export const LightingStage = nr.LightingStage;
|
|
|
|
|
export const PostProcessStage = nr.PostProcessStage;
|
|
|
|
|
export const GbufferStage = nr.GbufferStage;
|
|
|
|
|
export const BloomStage = nr.BloomStage;
|
|
|
|
|
export const ReflectionProbeFlow = nr.ReflectionProbeFlow;
|
|
|
|
|
export const ReflectionProbeStage = nr.ReflectionProbeStage;
|
|
|
|
|
export * from './pass-phase';
|
|
|
|
|
export const RenderPipeline: typeof NrRenderPipeline = nr.RenderPipeline;
|
|
|
|
|
export type RenderPipeline = NrRenderPipeline;
|
|
|
|
|
export const RenderFlow: typeof NrRenderFlow = nr.RenderFlow;
|
|
|
|
|
export type RenderFlow = NrRenderFlow;
|
|
|
|
|
export const RenderStage: typeof NrRenderStage = nr.RenderStage;
|
|
|
|
|
export type RenderStage = NrRenderStage;
|
|
|
|
|
export const InstancedBuffer: typeof NrInstancedBuffer = nr.InstancedBuffer;
|
|
|
|
|
export type InstancedBuffer = NrInstancedBuffer;
|
|
|
|
|
export const PipelineStateManager: typeof NrPipelineStateManager = nr.PipelineStateManager;
|
|
|
|
|
export type PipelineStateManager = NrPipelineStateManager;
|
|
|
|
|
export const ForwardPipeline: typeof NrForwardPipeline = nr.ForwardPipeline;
|
|
|
|
|
export type ForwardPipeline = NrForwardPipeline;
|
|
|
|
|
export const ForwardFlow: typeof NrForwardFlow = nr.ForwardFlow;
|
|
|
|
|
export type ForwardFlow = NrForwardFlow;
|
|
|
|
|
export const ShadowFlow: typeof NrShadowFlow = nr.ShadowFlow;
|
|
|
|
|
export type ShadowFlow = NrShadowFlow;
|
|
|
|
|
export const ForwardStage: typeof NrForwardStage = nr.ForwardStage;
|
|
|
|
|
export type ForwardStage = NrForwardStage;
|
|
|
|
|
export const ShadowStage: typeof NrShadowStage = nr.ShadowStage;
|
|
|
|
|
export type ShadowStage = NrShadowStage;
|
|
|
|
|
export const DeferredPipeline: typeof NrDeferredPipeline = nr.DeferredPipeline;
|
|
|
|
|
export type DeferredPipeline = NrDeferredPipeline;
|
|
|
|
|
export const MainFlow: typeof NrMainFlow = nr.MainFlow;
|
|
|
|
|
export type MainFlow = NrMainFlow;
|
|
|
|
|
export const LightingStage: typeof NrLightingStage = nr.LightingStage;
|
|
|
|
|
export type LightingStage = NrLightingStage;
|
|
|
|
|
export const PostProcessStage: typeof NrPostProcessStage = nr.PostProcessStage;
|
|
|
|
|
export type PostProcessStage = NrPostProcessStage;
|
|
|
|
|
export const GbufferStage: typeof NrGbufferStage = nr.GbufferStage;
|
|
|
|
|
export type GbufferStage = NrGbufferStage;
|
|
|
|
|
export const BloomStage: typeof NrBloomStage = nr.BloomStage;
|
|
|
|
|
export type BloomStage = NrBloomStage;
|
|
|
|
|
export const ReflectionProbeFlow: typeof NrReflectionProbeFlow = nr.ReflectionProbeFlow;
|
|
|
|
|
export type ReflectionProbeFlow = NrReflectionProbeFlow;
|
|
|
|
|
export const ReflectionProbeStage: typeof NrReflectionProbeStage = nr.ReflectionProbeStage;
|
|
|
|
|
export type ReflectionProbeStage = NrReflectionProbeStage;
|
|
|
|
|
export { PipelineEventType } from './pipeline-event';
|
|
|
|
|
|
|
|
|
|
interface IRenderFlowInfo {
|
|
|
|
@@ -79,7 +116,8 @@ nr.PipelineStateManager.getOrCreatePipelineState = function (device, pass, shade
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// ForwardPipeline
|
|
|
|
|
const forwardPipelineProto = ForwardPipeline.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const forwardPipelineProto: any = ForwardPipeline.prototype;
|
|
|
|
|
forwardPipelineProto._ctor = function () {
|
|
|
|
|
this._tag = 0;
|
|
|
|
|
this._flows = [];
|
|
|
|
@@ -104,7 +142,8 @@ forwardPipelineProto.onLoaded = function () {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const forwardFlowProto = ForwardFlow.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const forwardFlowProto: any = ForwardFlow.prototype;
|
|
|
|
|
forwardFlowProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -119,7 +158,8 @@ forwardFlowProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const shadowFlowProto = ShadowFlow.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const shadowFlowProto: any = ShadowFlow.prototype;
|
|
|
|
|
shadowFlowProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -134,7 +174,9 @@ shadowFlowProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const reflectionProbeFlowProto = ReflectionProbeFlow.prototype;
|
|
|
|
|
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const reflectionProbeFlowProto: any = ReflectionProbeFlow.prototype;
|
|
|
|
|
reflectionProbeFlowProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -149,7 +191,9 @@ reflectionProbeFlowProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const forwardStageProto = ForwardStage.prototype;
|
|
|
|
|
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const forwardStageProto: any = ForwardStage.prototype;
|
|
|
|
|
forwardStageProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -166,14 +210,17 @@ forwardStageProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const shadowStageProto = ShadowStage.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const shadowStageProto: any = ShadowStage.prototype;
|
|
|
|
|
shadowStageProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
|
this._tag = 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const reflectionProbeStage = ReflectionProbeStage.prototype;
|
|
|
|
|
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const reflectionProbeStage: any = ReflectionProbeStage.prototype;
|
|
|
|
|
reflectionProbeStage._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -235,7 +282,8 @@ export class RenderQueueDesc {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const deferredPipelineProto = DeferredPipeline.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const deferredPipelineProto: any = DeferredPipeline.prototype;
|
|
|
|
|
deferredPipelineProto._ctor = function () {
|
|
|
|
|
this._tag = 0;
|
|
|
|
|
this._flows = [];
|
|
|
|
@@ -255,7 +303,9 @@ deferredPipelineProto.onLoaded = function () {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const mainFlowProto = MainFlow.prototype;
|
|
|
|
|
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const mainFlowProto: any = MainFlow.prototype;
|
|
|
|
|
mainFlowProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -270,7 +320,8 @@ mainFlowProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const gbufferStageProto = GbufferStage.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const gbufferStageProto: any = GbufferStage.prototype;
|
|
|
|
|
gbufferStageProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -287,8 +338,8 @@ gbufferStageProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const lightingStageProto = LightingStage.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const lightingStageProto: any = LightingStage.prototype;
|
|
|
|
|
lightingStageProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -307,7 +358,8 @@ lightingStageProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const bloomStageProto = BloomStage.prototype;
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const bloomStageProto: any = BloomStage.prototype;
|
|
|
|
|
bloomStageProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -326,7 +378,9 @@ bloomStageProto.init = function (pipeline) {
|
|
|
|
|
this.initialize(info);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const postProcessStageProto = PostProcessStage.prototype;
|
|
|
|
|
|
|
|
|
|
// TODO: we mark it as type of any, because here we have many dynamic injected property @dumganhar
|
|
|
|
|
const postProcessStageProto: any = PostProcessStage.prototype;
|
|
|
|
|
postProcessStageProto._ctor = function () {
|
|
|
|
|
this._name = 0;
|
|
|
|
|
this._priority = 0;
|
|
|
|
@@ -350,8 +404,6 @@ legacyCC.RenderFlow = RenderFlow;
|
|
|
|
|
legacyCC.RenderStage = RenderStage;
|
|
|
|
|
legacyCC.RenderPipeline = RenderPipeline;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const RenderTexture: any = jsb.RenderTexture;
|
|
|
|
|
@ccclass('RenderTextureConfig')
|
|
|
|
|
class RenderTextureConfig {
|
|
|
|
|
@serializable
|
|
|
|
|