From 24e810305115a9cbae3ddc25aa098d6f82e28321 Mon Sep 17 00:00:00 2001 From: zxg0622 <247274249@qq.com> Date: Sat, 28 Dec 2019 16:12:12 +0800 Subject: [PATCH] fix render pipeline init error (#5994) --- cocos/core/pipeline/render-pipeline.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; }