فهرست منبع

Fix pixel ratio

Garrett Johnson 4 سال پیش
والد
کامیت
cdab337b20
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      examples/webgl_postprocessing_ssaa.html

+ 1 - 2
examples/webgl_postprocessing_ssaa.html

@@ -80,10 +80,9 @@
 				const width = window.innerWidth || 1;
 				const height = window.innerHeight || 1;
 				const aspect = width / height;
-				const devicePixelRatio = window.devicePixelRatio || 1;
 
 				renderer = new THREE.WebGLRenderer();
-				renderer.setPixelRatio( devicePixelRatio );
+				renderer.setPixelRatio( 1 ); // ensure pixel ratio is always 1 for performance reasons
 				renderer.setSize( width, height );
 				document.body.appendChild( renderer.domElement );