Skip to content

Light version: pages open quickly, without the 3D graphics. You are seeing the light version because the 3D graphics would be slow on this device. The content is the same.

Turn on 3D

Preparing the graphics. This can take a moment on the first visit.

Henry Lõiv

Web design & development

Quick Answer

Can lowering pixel ratio make a Three.js scene faster on mobile?

3D & WebGL 2 min read

Yes, if rendering pixels is the bottleneck. A canvas rendered at pixel ratio 3 contains nine times as many pixels as the same CSS-sized canvas at ratio 1. Lowering the drawing-buffer resolution can reduce that work. It will not directly fix slow JavaScript, excessive draw calls or large downloads. The Three.js responsive rendering guide explains why native phone resolution can be expensive.

Try a controlled comparison

For a simple WebGLRenderer scene with a perspective camera, compare the same camera and scene on the same phone using a lower ratio. This example uses 1.5 as an experimental ceiling; it is not a universal quality setting. Call the function after the canvas receives its layout size and when that size changes.

function resize() {
  const canvas = renderer.domElement
  const width = canvas.clientWidth
  const height = canvas.clientHeight
  if (!width || !height) return

  renderer.setPixelRatio(Math.min(window.devicePixelRatio || 1, 1.5))
  renderer.setSize(width, height, false)
  camera.aspect = width / height
  camera.updateProjectionMatrix()
}

The canvas needs an explicit CSS display size. setSize(..., false) changes its drawing buffer without overwriting that CSS size; the renderer applies its pixel ratio internally. Keep the camera aspect tied to the displayed dimensions. See the WebGLRenderer API. If you use a postprocessing composer or custom render targets, update their sizes through their own APIs too. For exact control of shader and picking coordinates, the manual’s explicit drawing-buffer sizing approach is preferable.

Decide from measurements

Compare steady frame times after loading and shader compilation, then inspect text and edges for lost clarity. Keep other settings unchanged. If lowering resolution barely helps, investigate CPU work, scene complexity and loading separately. Test on an actual phone; a desktop viewport alone does not reproduce its GPU or heat limits.

Read how this portfolio budgets rendering work, or explore 3D and WebGL development for a project that needs a measured mobile experience.

Fact checked:

Let’s talk about your project

Tell me about your project

Tell me what you’d like to build or improve. You don’t need a finished brief — we’ll work out the scope and next steps together.

01 How can I help?
02 How many pages do you need?
03 Which extras do you need? Choose all that apply
04 When does it need to be ready?
05 Project details
06 Your contact details

Enquiry received

Thank you!

Your enquiry has been received. I usually reply by email within 2 working days.