pbakaus/impeccable · warning
[impeccable] shader setup failed:
Error message
[impeccable] shader setup failed:
What it means
The WebGL shader overlay (the live visual shown while generating) compiles its program, allocates buffers, and wires attribute pointers inside one try block. Any throw — context creation failed, shader compile/link error, WebGL unavailable or context lost — logs 'shader setup failed:', removes the canvas, and returns: generation continues normally, just without the animated overlay.
Solutions
- Treat as cosmetic — the generate/steer flow completes without the overlay
- Reload the page to obtain a fresh WebGL context; close GPU-heavy tabs
- Enable hardware acceleration in browser settings if overlays matter
Defensive patterns
Strategy: fallback
Validate before calling
const gl = canvas.getContext('webgl');
if (!gl) { canvas.remove(); return; } // skip overlay entirely when WebGL is unavailable Try / catch
try { /* program + buffer + attribute setup */ } catch (err) { console.warn('shader setup failed:', err); canvas.remove(); return; } // generation proceeds without the overlay Prevention
- Treat the shader overlay as strictly optional; never gate the generate flow on it
- Release GL contexts when overlays are dismissed to avoid context exhaustion
- Test pages with hardware acceleration disabled to confirm the no-GL path
When it happens
Trigger: WebGL context lost (GPU reset, too many live contexts); hardware acceleration disabled or GPU blocklisted; shader compile failure after a browser/driver change; gl.getAttribLocation returning -1 leading to invalid vertex array state.
Common situations: Machines with GPU blocklists or virtualized GPUs; many tabs each holding WebGL contexts; users running with hardware acceleration off; remote-desktop sessions.
Related errors
- [impeccable] shader bitmap decode failed:
- shader compile failed
- [impeccable] shader resume failed:
- program link failed
AI-assisted analysis of pbakaus/impeccable@f2c7051853 (2026-08-18).
Data as JSON: /api/errors/b4ef12af82d4d2be.
Report an issue: GitHub.
Appendix: source
Thrown at skill/scripts/live-browser.js:8860
// teardown that landed inside that window found shaderState still null,
// returned, and then watched the construction publish itself over a session
// that had already left GENERATING, with no teardown left to run. That is
// the generating loader frozen over a page that already cycles (issue #719).
// Every teardown bumps this epoch; a construction abandons its own canvas as
// soon as it sees the epoch move.
let shaderEpoch = 0;
// The element's effective background tone, used as the uniform halftone
// ground so content dissolves into dots over it. Unlike resolveCanvasBackground
// (which returns null when the element paints its own bg), this always returns
// a usable color: the element's own background if any, else the nearest opaque
// ancestor, else the paper fallback.
// Rasterize any CSS color (oklch, color(), named, hex, rgb) through a 1x1
// canvas and read back the sRGB pixel. String-parsing computed colors is a
// trap: Chrome returns backgroundColor as oklch()/color() for oklch inputs,
// which a hex/rgb regex misses - every site token would fall back to white.
let colorParseCtx = null;
function cssColorToRgb01(str) {
if (!colorParseCtx) {
colorParseCtx = document.createElement('canvas').getContext('2d', { willReadFrequently: true });
}
// Clear first: the ctx is cached across calls, so a semi-transparent color
// would otherwise blend (source-over) with the previous call's leftover
// pixel, making the result depend on call history.
colorParseCtx.clearRect(0, 0, 1, 1);
colorParseCtx.fillStyle = '#000'; // invalid input leaves this default
colorParseCtx.fillStyle = str;
colorParseCtx.fillRect(0, 0, 1, 1);
const d = colorParseCtx.getImageData(0, 0, 1, 1).data;
return [d[0] / 255, d[1] / 255, d[2] / 255];
}
function resolvePaperRgb(el) {
let node = el;
while (node) {
const bg = getComputedStyle(node).backgroundColor;
if (!isTransparentColor(bg)) return cssColorToRgb01(bg);View on GitHub (pinned to f2c7051853)