Skip to content

Commit

Permalink
Set shader precission to mediump in Mobile. Fix problems with Adreno …
Browse files Browse the repository at this point in the history
…300 series GPUs and improves perf. (fix #3971, #3523)
  • Loading branch information
dmarcos committed Jan 30, 2019
1 parent cc4e5fe commit 1eab6e6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/core/scene/a-scene.js
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down

0 comments on commit 1eab6e6

Please sign in to comment.