diff --git a/src/core/scene/a-scene.js b/src/core/scene/a-scene.js index 478652886f6..756954ae091 100644 --- a/src/core/scene/a-scene.js +++ b/src/core/scene/a-scene.js @@ -548,7 +548,13 @@ module.exports.AScene = registerElement('a-scene', { var rendererAttrString; var rendererConfig; - rendererConfig = {alpha: true, antialias: !isMobile, canvas: this.canvas, logarithmicDepthBuffer: false}; + rendererConfig = { + alpha: true, + antialias: !isMobile, + canvas: this.canvas, + logarithmicDepthBuffer: false, + precision: isMobile && !window.hasNativeVR ? 'mediump' : 'highp' + }; this.maxCanvasSize = {height: 1920, width: 1920}; diff --git a/src/index.js b/src/index.js index 8fb5d59108e..55d14454604 100644 --- a/src/index.js +++ b/src/index.js @@ -6,6 +6,7 @@ window.Promise = window.Promise || require('promise-polyfill'); window.hasNativeWebVRImplementation = !!window.navigator.getVRDisplays || !!window.navigator.getVRDevices; window.hasNativeWebXRImplementation = navigator.xr !== undefined; +window.hasNativeVR = window.hasNativeWebVRImplementation || window.hasNativeWebXRImplementation; // If native WebXR or WebVR are defined WebVRPolyfill does not initialize. if (!window.hasNativeWebXRImplementation && !window.hasNativeWebVRImplementation) {