{"record":{"id":"7992e47c5c0c121c","repo":"remotion-dev/remotion","slug":"noise-displacement-shader-compile-failed-log","errorCode":null,"errorMessage":"Noise displacement shader compile failed: ${log ?? '(no log)'}","messagePattern":"Noise displacement shader compile failed: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"packages/effects/src/noise-displacement.ts","lineNumber":413,"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`Noise displacement 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":395,"sourceCodeEnd":431,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/effects/src/noise-displacement.ts#L395-L431","documentation":"The noiseDisplacement effect's GLSL shader source (NOISE_DISPLACEMENT_VS or NOISE_DISPLACEMENT_FS) failed to compile on the target GPU. The message includes the GLSL compiler log. The shader source is static within @remotion/effects, so this indicates a GPU driver incompatibility or a library-level shader bug — not a user parameter error.","triggerScenarios":"During setupNoiseDisplacement, gl.compileShader runs on NOISE_DISPLACEMENT_VS or NOISE_DISPLACEMENT_FS and gl.getShaderParameter(shader, gl.COMPILE_STATUS) returns false. The fragment shader is complex (noise functions, loops, arrays) and more likely to expose driver bugs.","commonSituations":"GPU drivers with incomplete WebGL2 GLSL ES 3.00 support; buggy drivers that reject valid array/loop constructs; outdated drivers; software rasterizers with limited shader support; very old GPU hardware.","solutions":["Report the issue to Remotion with the full compile log and GPU/driver details — the shader is library-controlled.","Update GPU drivers to the latest version.","Test with SwiftShader or a different GPU to isolate driver-specific issues.","On CI, ensure the headless Chrome build supports WebGL2 shader compilation."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"// Shader compile failures are library/driver bugs — catch and report\ntry {\n  // render with noiseDisplacement effect\n} catch (e) {\n  if (e instanceof Error && e.message.startsWith('Noise displacement shader compile failed')) {\n    console.error('Noise displacement shader compile failed:', e.message);\n    // Fallback: render without the effect\n  } else {\n    throw e;\n  }\n}","preventionTips":["Keep GPU drivers updated in render environments.","The noiseDisplacement fragment shader is complex (noise, loops, arrays) — test on target GPUs before production use.","Report shader compile logs to the Remotion team so library bugs can be addressed."],"tags":["webgl","gpu","glsl","shader","noise-displacement","driver-compat"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}