From 3a619a826ce2427b824e062acd5da461e44eef7e Mon Sep 17 00:00:00 2001 From: sunag Date: Fri, 16 Jun 2017 17:00:00 -0300 Subject: [PATCH] fix pixel ratio --- examples/js/nodes/utils/ResolutionNode.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/js/nodes/utils/ResolutionNode.js b/examples/js/nodes/utils/ResolutionNode.js index 5b5fb24bbd2a78..cb502f66d7f35d 100644 --- a/examples/js/nodes/utils/ResolutionNode.js +++ b/examples/js/nodes/utils/ResolutionNode.js @@ -17,9 +17,10 @@ THREE.ResolutionNode.prototype.constructor = THREE.ResolutionNode; THREE.ResolutionNode.prototype.updateFrame = function( delta ) { - var size = this.renderer.getSize(); + var size = this.renderer.getSize(), + pixelRatio = this.renderer.getPixelRatio(); - this.x = size.width; - this.y = size.height; + this.x = size.width * pixelRatio; + this.y = size.height * pixelRatio; };