-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Closed
Labels
Description
A little while ago clearRenderTarget() was (rightly) deprecated because it internally changed the render target. Now you have to do it explicitely:
renderer.setRenderTarget(target);
renderer.clear();This makes the internally used concept of a state machine more clear.
But by that logic a call to render() should use the current render target as well:
renderer.setRenderTarget(target);
renderer.render(scene, camera); // should render to targetBut that doesn't work because of this line:
three.js/src/renderers/WebGLRenderer.js
Line 1106 in 3013895
| this.setRenderTarget( renderTarget ); |
Right now it only works like this:
renderer.setRenderTarget(target);
renderer.render(scene, camera, target);Please let me know what you think. I'd be happy to submit a PR for this.
pailhead, looeee and inodino