{"record":{"id":"b4ef12af82d4d2be","repo":"pbakaus/impeccable","slug":"impeccable-shader-setup-failed","errorCode":null,"errorMessage":"[impeccable] shader setup failed:","messagePattern":"\\[impeccable\\] shader setup failed:","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"skill/scripts/live-browser.js","lineNumber":8392,"sourceCode":"      // Full-screen quad\n      const buf = gl.createBuffer();\n      gl.bindBuffer(gl.ARRAY_BUFFER, buf);\n      gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([\n        -1, -1, 0, 1,\n         1, -1, 1, 1,\n        -1,  1, 0, 0,\n        -1,  1, 0, 0,\n         1, -1, 1, 1,\n         1,  1, 1, 0,\n      ]), gl.STATIC_DRAW);\n      const posLoc = gl.getAttribLocation(program, 'a_position');\n      const uvLoc = gl.getAttribLocation(program, 'a_uv');\n      gl.enableVertexAttribArray(posLoc);\n      gl.vertexAttribPointer(posLoc, 2, gl.FLOAT, false, 16, 0);\n      gl.enableVertexAttribArray(uvLoc);\n      gl.vertexAttribPointer(uvLoc, 2, gl.FLOAT, false, 16, 8);\n    } catch (err) {\n      console.warn('[impeccable] shader setup failed:', err);\n      canvas.remove();\n      return;\n    }\n\n    // Upload the screenshot as a texture\n    let bitmap;\n    try {\n      bitmap = await createImageBitmap(blob);\n    } catch (err) {\n      console.warn('[impeccable] shader bitmap decode failed:', err);\n      const lose = gl.getExtension?.('WEBGL_lose_context');\n      try { lose?.loseContext(); } catch {}\n      showShaderBitmapFallback(canvas, blob);\n      return;\n    }\n    texture = gl.createTexture();\n    gl.bindTexture(gl.TEXTURE_2D, texture);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);","sourceCodeStart":8374,"sourceCodeEnd":8410,"githubUrl":"https://github.com/pbakaus/impeccable/blob/f88b2837a7d7c3182e46307bbbb091a1ed547571/skill/scripts/live-browser.js#L8374-L8410","documentation":"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.","triggerScenarios":"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.","commonSituations":"Machines with GPU blocklists or virtualized GPUs; many tabs each holding WebGL contexts; users running with hardware acceleration off; remote-desktop sessions.","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"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"const gl = canvas.getContext('webgl');\nif (!gl) { canvas.remove(); return; } // skip overlay entirely when WebGL is unavailable","typeGuard":null,"tryCatchPattern":"try { /* program + buffer + attribute setup */ } catch (err) { console.warn('shader setup failed:', err); canvas.remove(); return; } // generation proceeds without the overlay","preventionTips":["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"],"tags":["webgl","shader-overlay","gpu","cosmetic-degradation"],"backgroundTag":"webgl-context-failed","analyzedSha":"f88b2837a7d7c3182e46307bbbb091a1ed547571","analyzedAt":"2026-08-18T04:58:36.608Z","schemaVersion":2},"datasetVersion":"2026-08-30T08:17:16.595Z"}