Skip to content

Commit

Permalink
ReflectorNode: Add MRT support
Browse files Browse the repository at this point in the history
  • Loading branch information
sunag committed Aug 6, 2024
1 parent 0a3a34b commit f322de4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/nodes/utils/ReflectorNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f322de4

Please sign in to comment.