VRRenderer

VRRenderer

Renderer for virtual reality. Based on the tools provided by Three.js (which relies on WebXR). We place in distinct layer of the Three.js scene two horizon spheres. Each sphere will render the picture seen by one eye.

Constructor

new VRRenderer(shader1, shader2, set, camera, scene, params, threeRenderer)

Source:
To Do:
  • Check the impact of the pixel ratio (for the three.js camera)

Constructor.

Parameters:
Name Type Description
shader1 string

the first part of the geometry dependent shader

shader2 string

the second part of the geometry dependent shader

set TeleportationSet

the underlying teleportation set

camera VRCamera

the camera

scene Scene

the scene

params Object

parameters for the underlying Three.js renderer

threeRenderer WebGLRenderer | Object

parameters for the underlying Three.js renderer

Classes

VRRenderer

Members

(private) _fragmentBuilder :Array.<ShaderBuilder>

Source:

Builder for the fragment shader. The first one correspond to the left eye, the second one to the right eye

Type:

xr

Source:

Shortcut to access the Three.js WebXRManager