From 1eab6e6c909e39045bd48d10ada8135aca9c406c Mon Sep 17 00:00:00 2001 From: Diego Marcos Date: Wed, 30 Jan 2019 11:32:40 -0800 Subject: [PATCH] Set shader precission to mediump in Mobile. Fix problems with Adreno 300 series GPUs and improves perf. (fix #3971, #3523) --- src/core/scene/a-scene.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/scene/a-scene.js b/src/core/scene/a-scene.js index 478652886f6..18324357fa9 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 ? 'mediump' : 'highp' + }; this.maxCanvasSize = {height: 1920, width: 1920};