Foldlet

Nov 21, 2026 · Write-up

Fixing a white screen on the Pixel 10's GPU

This is a little three.js debugging journey from the launch week of Foldlet.

A friend installed the Foldlet Android app on her Pixel 10 Pro and got a white screen. Nothing loaded - no board, no astronaut and no error message! Chrome on the same phone ran the game fine, and so did my own phone.

I didn't have a Pixel 10, and her phone wasn't sending any crash reports. I had to work out what was wrong from a distance!

What's on the screen

Foldlet's game board is a 3D scene drawn with three.js, a JavaScript library that draws through WebGL, which is how a web page talks to the phone's graphics chip. The Android app is a thin wrapper around the website. It runs inside Android's WebView, which is more or less Chrome without the address bar.

Since Chrome on her phone was fine, the game wasn't simply broken there. Something about the WebView and that graphics chip together was going wrong.

Getting the phone to tell me

For a short while, the app sent a small report about six seconds after the board started, and another if WebGL stopped working. It included the WebView version, the screen size, the name of the graphics chip and whether WebGL had lost its connection to the chip. It also read a few pixels back off the screen, to check whether anything was being drawn at all. Nothing personal went in it, just the anonymous device ID the game already uses for crash reports.

Her reports said the chip was a PowerVR D-Series DXT-48-1536, the graphics chip in Google's Tensor G5, on Android 17. On four out of five launches, WebGL lost its "context" within a few seconds. The context is the page's live connection to the graphics chip. When it's lost, everything drawn through it disappears, and inside the app's WebView that blanked the whole page.

Trying to make it happen myself

I couldn't reproduce this bug! Android emulators on Android 16 and 17, with three WebView versions including hers, all drew the threejs game totally fine. Firebase Test Lab, Google's service for running an app on real phones in a data center, had a real Pixel 10 Pro, but only on Android 16... It also had Pixel 11 phones on Android 17, which use a different PowerVR chip. They were all fine, even set up in the same state her game was in!

Her combination of phone, Android version and graphics chip wasn't available anywhere I could possibly find to test. Incredibly frustrating! One option on the table was a broad "safe mode" that would have changed how the game draws on lots of phones. I didn't want to ship a guess that could affect people who never had the problem...

Shadows

Searching for the chip's name turned up other three.js projects with the same problem on the same GPU. In each one, the context was lost while drawing a "shadow map," and they fixed it by turning shadows off on that chip.

Here are the ones I found: a pull request in openPlan3D, an issue in Stacks from someone with the exact same chip on Android 17, and a pull request in Stealthy Murder Fun.

A shadow map is an extra drawing pass. Before drawing the scene normally, the renderer draws it once from the light's point of view and records how far away everything is. When it draws the real frames, it uses that to work out which points won't get lit up from the light source, and darkens them. Foldlet uses one for the soft shadows on the board. It's just a nice graphics thing.

So the fix was to check the chip's name before the first frame, and skip the shadow map on PowerVR D-Series:

export function shadowsBreakOn(gpu: string): boolean {
  return /PowerVR D-Series/i.test(gpu);
}

// in the renderer, before the first frame
this.shadows = !shadowsBreakOn(gpuName(context));
renderer.shadowMap.enabled = this.shadows;

The check matches the chip's name whether the browser reports it directly or through ANGLE, a translation layer that wraps it in a longer string. Every other GPU draws the same as before.

Checking the fix

The report also recorded whether shadows had been switched off, so I could see the fix running on her phone instead of guessing. Her next launches came back marked no-shadows, WebGL stayed connected, the board was drawn, and she told me it was working, so I was able to remove the diagnostics.

On her phone the board is drawn without shadows now. Everywhere else it looks the same as it did.

Crazy times!

← All notes

Play today’s puzzle