{"record":{"id":"c6b560df1b183c1c","repo":"remotion-dev/remotion","slug":"color-correction-shader-compile-failed-log","errorCode":null,"errorMessage":"Color correction shader compile failed: ${log ?? '(no log)'}","messagePattern":"Color correction shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/color-correction.ts","lineNumber":319,"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 color correction 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(\n\t\t\t`Color correction shader compile failed: ${log ?? '(no log)'}`,\n\t\t);\n\t}\n\n\treturn shader;\n};\n\nconst createProgram = (gl: WebGL2RenderingContext): WebGLProgram => {\n\tconst vertexShader = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);\n\tconst fragmentShader = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create color correction shader program');\n\t}\n\n\tgl.attachShader(program, vertexShader);\n\tgl.attachShader(program, fragmentShader);\n\tgl.linkProgram(program);","sourceCodeStart":301,"sourceCodeEnd":337,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/color-correction.ts#L301-L337","documentation":"Thrown by compileShader in the color correction effect when gl.getShaderParameter(shader, COMPILE_STATUS) is false. The shader source failed to compile on the active GL driver, and the driver's info log is included. Because the GLSL is bundled with the library, a compile failure almost always indicates a driver/GPU incompatibility or a context in a degraded state, not a user parameter.","triggerScenarios":"Inside compileShader at color-correction.ts:319 for the color-correction VERTEX_SHADER or FRAGMENT_SHADER. The driver rejected the GLSL ES 3.00 source; the info log (or '(no log)') is appended. Not parameter-driven.","commonSituations":"A GPU/driver or headless Chrome version that rejects a GLSL construct in the bundled shader, software GL (SwiftShader) with stricter limits, an outdated Chromium, or a context that reports success on creation but is effectively broken.","solutions":["Read the info log in the error message; it names the offending GLSL line/directive.","Update the GPU driver and/or the Chromium build used for rendering.","If on software GL, switch to a GPU-enabled render environment (GPU Lambda layer / --enable-gpu).","Report the driver, Chrome version, and log to Remotion if the shader is unchanged — it is a library/driver compatibility bug."],"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 correction shader compile failed/i.test(msg)) {\n    // driver/shader incompatibility: surface the info log and switch environments\n    throw new Error(`Color-correction 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 (SwiftShader) where bundled shaders may exceed limits; use a GPU environment.","When a compile log appears, file a Remotion issue with driver and Chrome version rather than editing library GLSL.","Pin a known-good Chrome/Chromium version in CI and Lambda."],"tags":["webgl","shader","glsl","color-correction","driver-compatibility","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}