Rendering two scenes separately and overlaying them requires setting renderer.autoClear
to false
. Inside the rendering loop, using renderer.clear()
works perfectly:
// This works fine!
renderer.clear();
renderer.render( bgScene, bgCamera )
renderer.clearDepth();
renderer.render( scene, camera );
However, adding a cubecamera to the scene for a reflective object causes issues when renderer.autoClear
is set to false
. This results in the texture of the reflective object not clearing when the surroundings change, leading to a "painting" effect:
// Causes "painting" effect
cubeCamera.updateCubeMap( renderer, scene );
A simplified fiddle demonstrating the issue is provided in the link below. The two scenes are omitted for simplicity. If this issue is a bug in the library, it will be reported in the repository.