Skip to content

Instantly share code, notes, and snippets.

@ayamflow
Created June 20, 2018 23:21
Show Gist options
  • Save ayamflow/411553359fb491439f3ea41d851408b2 to your computer and use it in GitHub Desktop.
Save ayamflow/411553359fb491439f3ea41d851408b2 to your computer and use it in GitHub Desktop.
Threejs - Rendering 2 scenes on top of each other without breaking render targets
// Need to toggle the autoClear flag to avoid breaking rendering to RenderTarget
function update(dt) {
renderer.render(scene, camera);
renderer.autoClear = false;
renderer.clearDepth();
renderer.render(orthoScene, orthoCamera);
renderer.autoClear = true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment