Browse Source

acoid restore buffer in xr

Raanan Weber 5 years ago
parent
commit
08bd5e075d
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/scene.ts

+ 3 - 1
src/scene.ts

@@ -3980,7 +3980,9 @@ export class Scene extends AbstractScene implements IAnimatable {
 
         // Restore back buffer
         this.activeCamera = currentActiveCamera;
-        this._bindFrameBuffer();
+        if (this._activeCamera && this._activeCamera.cameraRigMode !== Camera.RIG_MODE_CUSTOM) {
+            this._bindFrameBuffer();
+        }
         this.onAfterRenderTargetsRenderObservable.notifyObservers(this);
 
         for (let step of this._beforeClearStage) {