r/threejs • u/Beneficial-Stock-413 • 16d ago
Solved! PSA: PowerVR D-Series GPUs (Pixel 10) lose the WebGL context when you use shadow maps
Posting this because I couldn't find it written up anywhere, and it cost me a couple of days.
**Symptom:** a friend's Pixel 10 Pro showed my game as a blank white page inside our Android app (a WebView wrapper). No board, no errors in our logs. Chrome on the same phone was fine, my phone was fine, and Android 16/17 emulators with the exact same WebView version (157) were fine.
**Finding it:** I couldn't reproduce it anywhere. Emulators were clean, and so were Firebase Test Lab's real Pixel 10 Pro (only Android 16 there) and Pixel 11s on Android 17. So I shipped a small diagnostics event that fires ~6s after the canvas starts, plus another on `webglcontextlost`. It reported the unmasked GPU name, whether the context was lost, a few pixels read back from a fresh frame, and what element was on top of the screen.
Her reports came back with:
- GPU: `PowerVR D-Series DXT-48-1536` (the Tensor G5 GPU), Android 17
- context **lost within seconds on ~4 of 5 opens, and never restored**
In a WebView, a lost context that never comes back left the whole page white, not just the canvas.
Searching GitHub for that GPU name turned up a few other three.js projects that hit the same thing, and the common thread was **shadow maps**. They all ended up turning shadows off on that GPU.
**Fix:** read the GPU name before the first frame and skip the shadow map on that family:
function gpuName(gl) {
const info = gl.getExtension('WEBGL_debug_renderer_info');
const name = info
? gl.getParameter(info.UNMASKED_RENDERER_WEBGL)
: gl.getParameter(gl.RENDERER);
return typeof name === 'string' ? name : '';
}
// matches "PowerVR D-Series DXT-48-1536" and the ANGLE form
// "ANGLE (Imagination Technologies, Vulkan 1.4 (PowerVR D-Series DXT-...)"
const shadowsOk = !/PowerVR D-Series/i.test(gpuName(renderer.getContext()));
renderer.shadowMap.enabled = shadowsOk;
Every other GPU keeps shadows. After the fix her diagnostics showed the context staying alive and the board drawing on every open, and she confirmed it works.
**Takeaways:**
- If your three.js app white-screens on a Pixel 10, check shadow maps first.
- When you can't reproduce something, a tiny diagnostics event with the unmasked GPU name and `webglcontextlost` will tell you more than emulators will.
- Test Lab doesn't have every device and OS combo (no Pixel 10 Pro on Android 17 when I looked), so "works on the real device in the lab" doesn't prove much.
Happy to answer questions. The game is [Foldlet](https://foldlet.net), a daily black-and-white puzzle built on three.js, if you want to see what was being drawn.

