diff --git a/cocos/core/pipeline/render-pipeline.ts b/cocos/core/pipeline/render-pipeline.ts index c5aafcd612..476538cd42 100644 --- a/cocos/core/pipeline/render-pipeline.ts +++ b/cocos/core/pipeline/render-pipeline.ts @@ -700,8 +700,6 @@ export abstract class RenderPipeline { this._depthStencilFmt = GFXFormat.D16; } - this.updateMacros(); - // colorFmt = GFXFormat.RGBA16F; // this._shadingScale = this._device.devicePixelRatio; @@ -794,6 +792,9 @@ export abstract class RenderPipeline { this.addRenderPass(RenderPassStage.DEFAULT, windowPass); + // update global defines when all states initialized. + this.updateMacros(); + return true; }