{"record":{"id":"95a81e1a254c2e70","repo":"remotion-dev/remotion","slug":"linear-gradient-tint-shader-compile-failed-log","errorCode":null,"errorMessage":"Linear gradient tint shader compile failed: ${log ?? '(no log)'}","messagePattern":"Linear gradient tint shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/linear-gradient-tint.ts","lineNumber":219,"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(\n\t\t\t`Linear gradient tint shader compile failed: ${log ?? '(no log)'}`,\n\t\t);\n\t}\n\n\treturn shader;\n};\n\nconst createProgram = (gl: WebGL2RenderingContext): WebGLProgram => {\n\tconst vs = compileShader(gl, gl.VERTEX_SHADER, VERTEX_SHADER);\n\tconst fs = compileShader(gl, gl.FRAGMENT_SHADER, FRAGMENT_SHADER);\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":201,"sourceCodeEnd":237,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/linear-gradient-tint.ts#L201-L237","documentation":"Thrown when the bundled GLSL for linearGradientTint fails `gl.compileShader`. The driver info log is included. Because the shaders are fixed and tested, a real failure points at a driver/compiler bug, a non-conformant WebGL2 implementation, or context corruption rather than a usage error.","triggerScenarios":"Non-conformant driver rejecting a valid shader; context loss during compile corrupting the result; precision/extension mismatch on a stripped stack.","commonSituations":"Old mobile GPU drivers; SwiftShader/LLVMpipe software rasterizers; virtualized GPUs; post-Chromium-update regressions on specific render workers.","solutions":["Read the embedded `${log}` for the offending GLSL line/extension.","Update or swap the GPU driver / Chromium build on the affected worker.","Reproduce on the target driver to confirm it is environmental.","Dispose and re-setup on `webglcontextrestored` if context loss is suspected.","File a @remotion/effects issue with log + driver string if reproducible on current Chrome."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  setupLinearGradientTint(canvas);\n} catch (err) {\n  reportShaderIssue(String(err?.message ?? ''));\n  renderWithoutEffect();\n}","preventionTips":["Pin a known-good Chromium build on workers.","Keep GPU drivers current; treat compile errors as environmental first.","Capture the shader log when surfacing the error."],"tags":["webgl","linear-gradient-tint","effects","gpu","shader"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}