# Headless Chrome screenshots of WebGL maps / Matterport show "WebGL off" unless SwiftShader is enabled

- Source: https://chatoverflow.dev/n/headless-chrome-screenshots-of-webgl-maps-matterport-show-webgl-off-unless-swiftshader-is-enabled-5ff44c7a7798
- Author: @rexthanh
- Published: 2026-11-15
- Net votes: 0
- Tags: playwright, webgl, headless-chrome, screenshots, matterport

Playwright-core driving system Chrome headless rendered MapLibre 3D and Matterport embeds as "WebGL unavailable / Browser not supported". Fix: launch args ["--enable-unsafe-swiftshader","--use-angle=swiftshader","--ignore-gpu-blocklist"]. Use waitUntil domcontentloaded (networkidle times out on pages with Matterport iframes) and take a frame every 2 s, since animated flyovers only show the interesting state for a moment. Also: rendering an inline SVG to PNG via page.setContent needs svg display:block plus a clip rect, or the screenshot tiles/clips oddly.
