{"record":{"id":"5021c9ef0d75c225","repo":"remotion-dev/remotion","slug":"blur-passed-to-blurslide-must-be-greater-than-or","errorCode":null,"errorMessage":"blur passed to blurSlide() must be greater than or equal to 0, received ${blur}","messagePattern":"blur passed to blurSlide\\(\\) must be greater than or equal to 0, received (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/transitions/src/presentations/blur-slide.tsx","lineNumber":202,"sourceCode":"\nconst validateProps = (props: BlurSlideProps) => {\n\tconst direction = props.direction ?? DEFAULT_DIRECTION;\n\tconst blur = props.blur ?? DEFAULT_BLUR;\n\n\tif (!VALID_DIRECTIONS.includes(direction)) {\n\t\tthrow new TypeError(\n\t\t\t`direction passed to blurSlide() must be one of ${VALID_DIRECTIONS.map((d) => `\"${d}\"`).join(', ')}, received ${JSON.stringify(direction)}`,\n\t\t);\n\t}\n\n\tif (typeof blur !== 'number' || !Number.isFinite(blur)) {\n\t\tthrow new TypeError(\n\t\t\t`blur passed to blurSlide() must be a finite number, received ${blur}`,\n\t\t);\n\t}\n\n\tif (blur < 0) {\n\t\tthrow new TypeError(\n\t\t\t`blur passed to blurSlide() must be greater than or equal to 0, received ${blur}`,\n\t\t);\n\t}\n};\n\nexport const blurSlideShader = (\n\tcanvas: OffscreenCanvas,\n): ReturnType<HtmlInCanvasShader<BlurSlideProps>> => {\n\tconst gl = canvas.getContext('webgl2', {premultipliedAlpha: true});\n\tif (!gl) {\n\t\tthrow new Error('Failed to create WebGL2 context');\n\t}\n\n\tconst slideProgram = createProgram(gl, SLIDE_FRAGMENT_SHADER);\n\tconst blurProgram = createProgram(gl, BLUR_FRAGMENT_SHADER);\n\tconst prevTex = createTexture(gl);\n\tconst nextTex = createTexture(gl);\n\tconst intermediateTex = createTexture(gl);","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/transitions/src/presentations/blur-slide.tsx#L184-L220","documentation":"validateProps for the blurSlide() presentation enforces that the blur prop, when provided, is a number >= 0 (after the finite-number check). A negative blur is physically meaningless for the CSS blur used by the transition, so it throws a TypeError naming the received value.","triggerScenarios":"blurSlide({blur: -5}) or a computed blur (e.g. interpolated value) that dips below zero during animation.","commonSituations":"Interpolating blur over time with an easing that overshoots below 0; sign errors in formulas deriving blur from other values.","solutions":["Clamp the blur value: Math.max(0, blur)","Pass a non-negative constant like blur: 10","Fix the interpolation/formula producing negative values","Omit blur to use DEFAULT_BLUR"],"exampleFix":"// before\nblurSlide({blur: springValue}) // may go negative\n// after\nblurSlide({blur: Math.max(0, springValue)})","handlingStrategy":"validation","validationCode":"const safeBlur = Math.max(0, blur);\nif (!Number.isFinite(safeBlur)) throw new TypeError('blur must be finite');","typeGuard":"const isNonNegative = (v: number): boolean => Number.isFinite(v) && v >= 0;","tryCatchPattern":"try {\n  presentation = blurSlide({blur: animatedBlur});\n} catch (err) {\n  if (err instanceof TypeError && err.message.includes('greater than or equal to 0')) {\n    presentation = blurSlide({blur: Math.max(0, animatedBlur)});\n  }\n}","preventionTips":["Clamp interpolated/animated blur values with Math.max(0, v)","Check easing curves for undershoot below zero","Fix sign errors in formulas that compute blur","Omit blur to use the default"],"tags":["props","validation","value-range"],"backgroundTag":"value-out-of-range","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}