{"record":{"id":"b3bb334966ccbed5","repo":"remotion-dev/remotion","slug":"lut-shader-link-failed-log-no-log","errorCode":null,"errorMessage":"LUT shader link failed: ${log ?? '(no log)'}","messagePattern":"LUT shader link failed: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/effects/src/lut/lut-runtime.ts","lineNumber":66,"sourceCode":"\t\tgl,\n\t\tgl.FRAGMENT_SHADER,\n\t\tLUT_FRAGMENT_SHADER,\n\t);\n\tconst program = gl.createProgram();\n\tif (!program) {\n\t\tthrow new Error('Failed to create LUT shader program');\n\t}\n\n\tgl.attachShader(program, vertexShader);\n\tgl.attachShader(program, fragmentShader);\n\tgl.linkProgram(program);\n\tgl.deleteShader(vertexShader);\n\tgl.deleteShader(fragmentShader);\n\n\tif (!gl.getProgramParameter(program, gl.LINK_STATUS)) {\n\t\tconst log = gl.getProgramInfoLog(program);\n\t\tgl.deleteProgram(program);\n\t\tthrow new Error(`LUT shader link failed: ${log ?? '(no log)'}`);\n\t}\n\n\treturn program;\n};\n\nconst createSourceTexture = (gl: WebGL2RenderingContext): WebGLTexture => {\n\tconst texture = gl.createTexture();\n\tif (!texture) {\n\t\tthrow new Error('Failed to create LUT source texture');\n\t}\n\n\tgl.bindTexture(gl.TEXTURE_2D, texture);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n\tgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n\tgl.bindTexture(gl.TEXTURE_2D, null);\n\treturn texture;","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/remotion-dev/remotion/blob/46a3a6bf13ca367376ff18bbb06dae2e87e0d068/packages/effects/src/lut/lut-runtime.ts#L48-L84","documentation":"createProgram() compiles and links the LUT vertex/fragment shaders into a WebGLProgram. When gl.getProgramParameter(program, gl.LINK_STATUS) is false, the GPU driver refused to link the shaders, and this Error is thrown with the driver's info log (or '(no log)' when the driver provides none). The failed program is deleted before throwing to avoid leaking GPU resources.","triggerScenarios":"Calling <Lut effect> (which calls setupLut -> createProgram) on a browser/GPU whose WebGL2 implementation rejects the built-in LUT shaders; running on a driver with broken shader translation; using a very old browser with incomplete WebGL2/GLSL ES 3.0 support.","commonSituations":"Older or virtualized GPU drivers (VMs, remote desktops, software renderers like SwiftShader misconfigurations) fail to translate the shaders; browser bugs in specific GPU/driver combinations; headless rendering environments with missing GPU support.","solutions":["Inspect the info log embedded in the error message to identify which shader/limit the driver rejected","Update GPU drivers and the browser to a current version with full WebGL2 support","Verify the context is WebGL2 (gl instanceof WebGL2RenderingContext); the shaders use GLSL ES 3.0 syntax","Test in another browser (Chrome/Firefox/Safari) to isolate a driver-specific shader translation bug","If it persists on one machine, fall back to software rendering or flag the device as unsupported"],"exampleFix":"// before: assuming any WebGL context works\nconst gl = canvas.getContext('webgl');\n// after: require WebGL2 and check shader support up front\nconst gl = canvas.getContext('webgl2');\nif (!gl) throw new Error('WebGL2 required for LUT effects');","handlingStrategy":"try-catch","validationCode":"const gl = canvas.getContext('webgl2');\nif (!gl) throw new Error('WebGL2 required for the LUT effect');","typeGuard":null,"tryCatchPattern":"try {\n  state = setupLut({ gl, width, height, lutContent });\n} catch (e) {\n  if (String(e.message).startsWith('LUT shader link failed')) {\n    // log e.message (contains driver info log) and disable the LUT effect\n  }\n}","preventionTips":["Require WebGL2 and feature-detect before mounting the effect","Keep browser and GPU drivers current","Capture the info log from the error message when reporting bugs","Provide a fallback rendering path (no LUT) for unsupported GPUs"],"tags":["webgl","shader","lut","gpu-driver"],"backgroundTag":"module-init-failed","analyzedSha":"46a3a6bf13ca367376ff18bbb06dae2e87e0d068","analyzedAt":"2026-09-18T00:12:20.256Z","contentChangedAt":"2026-09-18T00:12:20.256Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}