From f322de470c4b50dc9306966a87f53d2672948a9e Mon Sep 17 00:00:00 2001 From: sunag Date: Tue, 6 Aug 2024 13:40:14 -0300 Subject: [PATCH] ReflectorNode: Add MRT support --- src/nodes/utils/ReflectorNode.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nodes/utils/ReflectorNode.js b/src/nodes/utils/ReflectorNode.js index 68c13fd68477c6..31ab3136124be6 100644 --- a/src/nodes/utils/ReflectorNode.js +++ b/src/nodes/utils/ReflectorNode.js @@ -214,11 +214,14 @@ class ReflectorNode extends TextureNode { material.visible = false; const currentRenderTarget = renderer.getRenderTarget(); + const currentMRT = renderer.getMRT(); + renderer.setMRT( null ); renderer.setRenderTarget( renderTarget ); renderer.render( scene, virtualCamera ); + renderer.setMRT( currentMRT ); renderer.setRenderTarget( currentRenderTarget ); material.visible = true;