{"record":{"id":"e2e031cffb19def7","repo":"remotion-dev/remotion","slug":"halftone-shader-compile-failed-log-no-log","errorCode":null,"errorMessage":"Halftone shader compile failed: ${log ?? '(no log)'}","messagePattern":"Halftone shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/halftone.ts","lineNumber":365,"sourceCode":"\tline: 2,\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(`Halftone 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":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/halftone.ts#L347-L383","documentation":"Thrown by compileShader() in the halftone effect when gl.getShaderParameter(shader, gl.COMPILE_STATUS) is false. The driver's shader-info log is appended (or '(no log)'). Because the GLSL source is a fixed string shipped with @remotion/effects, a compile failure means the driver rejected valid GLSL ES 3.00 — a driver bug, a WebGL2 implementation gap, or feature-descriptors mismatch.","triggerScenarios":"Compiling the halftone shaders on a GPU/driver whose GLSL ES 3.00 compiler rejects constructs the shader uses (e.g. certain loop bounds, textureGrad, integer math); headless software GL backends with incomplete compilers; a GPU driver crash mid-compile.","commonSituations":"Headless render with swiftshader or an outdated mesa; remote Linux rendering with nouveau; resumed-from-sleep context; rare transient driver faults.","solutions":["Read the driver info log embedded in the message — it names the line and reason the compiler rejected.","Render on a machine with a working WebGL2/GLSL ES 3.00 stack (hardware acceleration, or Remotion's default headless shell).","Update the GPU driver to a version with complete GLSL ES 3.00 support.","If transient (context loss), restart the render once."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  // ...use halftone()\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Halftone shader compile failed')) {\n    // driver info log is in e.message; switch to a known-good WebGL2 stack\n    console.error(e.message);\n  } else throw e;\n}","preventionTips":["Render with hardware acceleration or Remotion's bundled headless shell rather than custom swiftshader.","Keep GPU drivers current so GLSL ES 3.00 compiles cleanly.","Smoke-test one WebGL2 effect in CI before the full run."],"tags":["webgl","halftone","shader","gpu-driver","rendering"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}