Explorar o código

acoid restore buffer in xr

Raanan Weber %!s(int64=5) %!d(string=hai) anos
pai
achega
08bd5e075d
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  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) {