{"record":{"id":"0427fd810c14734c","repo":"remotion-dev/remotion","slug":"contour-lines-shader-compile-failed-log-no","errorCode":null,"errorMessage":"Contour lines shader compile failed: ${log ?? '(no log)'}","messagePattern":"Contour lines shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/contour-lines.ts","lineNumber":361,"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`Contour lines shader compile failed: ${log ?? '(no log)'}`,\n\t\t);\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);","sourceCodeStart":343,"sourceCodeEnd":379,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/contour-lines.ts#L343-L379","documentation":"Thrown by compileShader in contour-lines.ts when gl.getShaderParameter(shader, gl.COMPILE_STATUS) returns false after gl.compileShader(). The shader source (CONTOUR_LINES_VS or CONTOUR_LINES_FS) failed to compile, and the GLSL info log is included. Since the shader source is a library constant, a compile failure usually points to a GPU/driver that does not support a required GLSL ES 3.00 feature rather than a user error.","triggerScenarios":"setupContourLines compiles the vertex or fragment shader, and the GLSL compiler rejects it. The error includes the info log from gl.getShaderInfoLog(). This is internal to the contour-lines effect setup and is not caused by user parameter values.","commonSituations":"GPU or driver lacks full GLSL ES 3.00 (#version 300 es) support despite advertising WebGL2; outdated mobile GPU drivers; a browser bug in shader translation layer; running on a virtual GPU with incomplete GLSL support; the contour-lines shader uses features (highp float, textureless noise) not supported on the device.","solutions":["Update GPU drivers to the latest version.","Use a different rendering environment with a more complete WebGL2 implementation (e.g. Chrome with hardware acceleration rather than a limited software fallback).","For headless Remotion rendering, ensure the Chrome build includes GPU support or a full SwiftShader implementation.","Report the info log contents to Remotion if it occurs on a modern, fully-capable GPU — it may indicate a shader compatibility bug."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  contourLines({...})(source, target);\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Contour lines shader compile failed')) {\n    // driver/GPU compatibility issue — not a parameter problem\n    // capture e.message (includes GLSL info log) for diagnostics\n  }\n  throw e;\n}","preventionTips":["Keep GPU drivers updated.","Test on multiple GPUs/browsers if shader compilation fails.","Use a Chrome build with full WebGL2/SwiftShader for headless rendering.","Collect the info log from the error message when reporting the issue."],"tags":["webgl","effects","contour-lines","shader","gpu","driver"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}