{"record":{"id":"b1ce88a00b02cf45","repo":"remotion-dev/remotion","slug":"color-key-shader-compile-failed-log-no-log","errorCode":null,"errorMessage":"Color key shader compile failed: ${log ?? '(no log)'}","messagePattern":"Color key shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/color-key.ts","lineNumber":200,"sourceCode":"}\n`;\n\nconst compileShader = (\n\tgl: WebGL2RenderingContext,\n\ttype: number,\n\tsource: string,\n): WebGLShader => {\n\tconst shader = gl.createShader(type);\n\tif (!shader) {\n\t\tthrow new Error('Failed to create WebGL shader');\n\t}\n\n\tgl.shaderSource(shader, source);\n\tgl.compileShader(shader);\n\tif (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) {\n\t\tconst log = gl.getShaderInfoLog(shader);\n\t\tgl.deleteShader(shader);\n\t\tthrow new Error(`Color key shader compile failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn shader;\n};\n\nconst linkProgram = (\n\tgl: WebGL2RenderingContext,\n\tvs: WebGLShader,\n\tfs: WebGLShader,\n): WebGLProgram => {\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create WebGL program');\n\t}\n\n\tgl.attachShader(program, vs);\n\tgl.attachShader(program, fs);\n\tgl.linkProgram(program);","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/color-key.ts#L182-L218","documentation":"Thrown by compileShader in the color key effect when gl.getShaderParameter(shader, COMPILE_STATUS) is false. The bundled COLOR_KEY_VS or COLOR_KEY_FS failed to compile on the active driver; the driver info log is appended. Since the GLSL ships with the library, a compile failure usually reflects a driver/version incompatibility, not a colorKey() parameter.","triggerScenarios":"At color-key.ts:200 inside compileShader when the driver rejects the GLSL ES 3.00 source of the color key shaders. The info log (or '(no log)') is included; not parameter-driven.","commonSituations":"A GPU/driver or Chromium version that rejects a construct in the bundled shader, software GL (SwiftShader) with stricter limits, an outdated Chromium, or a degraded context.","solutions":["Read the info log in the error to find the offending GLSL line/directive.","Update the GPU driver and/or the Chromium build used for rendering.","Move off software GL to a GPU-enabled render environment.","Report driver, Chrome version, and log to Remotion — the shader is library-controlled."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await renderMedia({...});\n} catch (err) {\n  const msg = String(err);\n  if (/Color key shader compile failed/i.test(msg)) {\n    // driver/GLSL incompatibility; surface the log and switch environments\n    throw new Error(`Color-key shader rejected by driver. Log: ${msg}`);\n  }\n  throw err;\n}","preventionTips":["Keep GPU drivers and the Chromium render build up to date.","Avoid software GL where bundled color-key shaders may exceed limits.","On failure, capture the info log and report it to Remotion with environment details.","Pin a known-good Chromium version in CI and Lambda."],"tags":["webgl","shader","glsl","color-key","driver-compatibility","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}