Jelajahi Sumber

fix for all cameras with output render target

Raanan Weber 4 tahun lalu
induk
melakukan
78026df9c6
1 mengubah file dengan 2 tambahan dan 4 penghapusan
  1. 2 4
      src/scene.ts

+ 2 - 4
src/scene.ts

@@ -3789,10 +3789,8 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
 
         // Finalize frame
         if (this.postProcessManager && !camera._multiviewTexture) {
-            // When in XR the outputRenderTarget should be the one the post process is rendered to
-            // To keep the current behavior, I am checking for rigCamera AND that there is an outputRenderTarget defined.
-            // If there isn't, the previous behavior is kept.
-            const texture = camera.isRigCamera && camera.outputRenderTarget ? camera.outputRenderTarget.getInternalTexture()! : undefined;
+            // if the camera has an output render target, render the post process to the render target
+            const texture = camera.outputRenderTarget ? camera.outputRenderTarget.getInternalTexture()! : undefined;
             this.postProcessManager._finalizeFrame(camera.isIntermediate, texture);
         }