瀏覽代碼

Fix Shadow stick over FrameBuffer

sebavan 5 年之前
父節點
當前提交
77b5c3d18e
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/Lights/Shadows/shadowGenerator.ts

+ 3 - 1
src/Lights/Shadows/shadowGenerator.ts

@@ -914,7 +914,9 @@ export class ShadowGenerator implements IShadowGenerator {
             let shadowMap = this.getShadowMapForRendering();
 
             if (shadowMap) {
-                this._scene.postProcessManager.directRender(this._blurPostProcesses, shadowMap.getInternalTexture(), true);
+                const texture = shadowMap.getInternalTexture()!;
+                this._scene.postProcessManager.directRender(this._blurPostProcesses, texture, true);
+                engine.unBindFramebuffer(texture, true);
             }
         });