Ver código fonte

Fix Shadow stick over FrameBuffer

sebavan 5 anos atrás
pai
commit
77b5c3d18e
1 arquivos alterados com 3 adições e 1 exclusões
  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);
             }
         });