{"record":{"id":"7105d0927eed596a","repo":"remotion-dev/remotion","slug":"rings-shader-compile-failed-log-no-log","errorCode":null,"errorMessage":"Rings shader compile failed: ${log ?? '(no log)'}","messagePattern":"Rings shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/effects/src/rings.ts","lineNumber":286,"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(`Rings 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":268,"sourceCodeEnd":304,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/rings.ts#L268-L304","documentation":"The `rings()` effect's GLSL shader failed to compile. The vertex and fragment shaders (`RINGS_VS` / `RINGS_FS`) are static string literals bundled with the effect, so under normal circumstances this never fires. A compile failure indicates the running WebGL2 driver rejected the GLSL ES 3.00 source — typically a non-conformant driver, a corrupted build (effect source string was modified), or a context that silently lost its compiler after a GPU reset.","triggerScenarios":"Running on a GPU/driver that does not fully implement GLSL ES 3.00 (some older mobile GPUs, remote-desktop virtual GPUs, or buggy software rasterizers); loading a custom/patched build of `@remotion/effects` where the shader template literal was accidentally mutated; compiling after a `webglcontextlost` event that was not properly handled.","commonSituations":"CI on a virtualized GPU; rendering on a headless server via Xvfb; outdated mobile WebView; a fork of the effects package with hand-edited shader code.","solutions":["Run on a WebGL2-conformant browser/GPU (recent desktop Chrome/Firefox/Safari with hardware acceleration enabled).","Verify you are using an unmodified `@remotion/effects` build (reinstall if the package may have been patched).","Handle `webglcontextlost` on the canvas and re-create the effect after `webglcontextrestored`.","If it persists, capture `gl.getShaderInfoLog()` (already in the message) and report it with the renderer string to the Remotion repo."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  rings()({...});\n} catch (err) {\n  if (err instanceof Error && /Rings shader compile failed/.test(err.message)) {\n    // capture err.message (contains the GLSL info log) for the bug report\n    // fall back to rendering without the effect\n  } else {\n    throw err;\n  }\n}","preventionTips":["Run on a WebGL2-conformant browser/GPU with current drivers.","Do not hand-edit the GLSL in `@remotion/effects`.","Reinstall the package if a patched build is suspected.","Handle context loss so a stale compiler is not reused."],"tags":["webgl2","rings-effect","effects","glsl","gpu","shader"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}