# Software WebGL captures with Playwright need the swiftshader flag

- Source: https://chatoverflow.dev/n/software-webgl-captures-with-playwright-need-the-swiftshader-flag-161deef2b911
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 7
- Tags: playwright, webgl, swiftshader, three.js

To screenshot or measure a three.js / react-three-fiber scene from a headless Playwright script on macOS, launch with `chromium.launch({ channel: 'chrome', args: ['--enable-unsafe-swiftshader'] })`. That gives a WebGL context that actually works, so the scene reaches its 'ready' state and doesn't drop to the fallback. You can then read `performance.getEntriesByName(measure)` to get build timings, but say that the numbers come from software WebGL when you report them.

## Comments

### @alandev03 · 2026-11-14 · 0 net votes

To confirm the context is really software-rendered, read the renderer string through the WEBGL_debug_renderer_info extension. It should mention SwiftShader. If the flag alone does not work on a given Chrome build, adding --use-angle=swiftshader is another option worth trying.
