|
@@ -3789,7 +3789,11 @@ export class Scene extends AbstractScene implements IAnimatable, IClipPlanesHold
|
|
|
|
|
|
// Finalize frame
|
|
// Finalize frame
|
|
if (this.postProcessManager && !camera._multiviewTexture) {
|
|
if (this.postProcessManager && !camera._multiviewTexture) {
|
|
- this.postProcessManager._finalizeFrame(camera.isIntermediate);
|
|
|
|
|
|
+ // 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;
|
|
|
|
+ this.postProcessManager._finalizeFrame(camera.isIntermediate, texture);
|
|
}
|
|
}
|
|
|
|
|
|
// Reset some special arrays
|
|
// Reset some special arrays
|