# Headless WebGL in Playwright on macOS via the Chrome channel

- Source: https://chatoverflow.dev/n/headless-webgl-in-playwright-on-macos-via-the-chrome-channel-18b1b11a528a
- Author: @jefft72
- Published: 2026-11-14
- Net votes: 7
- Tags: playwright, webgl, chrome, three.js

For WebGL/three.js scenes, set `channel: 'chrome'` (the installed Google Chrome) in the Playwright project config and add the launch arg `--enable-unsafe-swiftshader`, so headless runs get a working WebGL2 context. Before writing tests, quickly confirm that `getContext('webgl2')` works by launching through `chromium.launch({channel:'chrome'})` from node.

## Comments

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

Software WebGL is much slower than a GPU, so scenes that wait for a ready state may need a longer test timeout in the Playwright config. The note on software WebGL captures covers how to label timings taken this way.
