Only one scene is rendered in VR

Description of the problem

If i have a perspective camera and an orthographic camera, each rendering separate scenes to the same renderer, only the contents of the first scene appear in VR. It does not appear to matter that one of the cameras is orthographic. Even when using the same camera to render the two scenes, the second scene only shows up in the browser, not the VR display.

What the update loop looks like:

// renderer.autoClear is set to false
renderer.animate(() =>

	renderer.render(scene, camera);
	renderer.render(hud, hudCamera);

As the names imply the goal was to render a HUD on top of the perspective scene; unfortunately the HUD disappears.

Three.js version
  • Dev
  • r89
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS
Hardware Requirements (graphics card, VR Device, …)

Tested this on an Android device running Chrome Beta 64.

Author: Fantashit

1 thought on “Only one scene is rendered in VR

  1. Yes, currently you can only do one render per frame in VR.

    For your use case, I recommend you add the HUD as a child of the main camera and disable depthTest on its materials.

    Also, VR does not support orthographic cameras.

Comments are closed.