remotion-dev/remotion · error · TypeError
"blur" must be >= 0, but got ${JSON.stringify(r.blur)}
Error message
"blur" must be >= 0, but got ${JSON.stringify(r.blur)} What it means
The noiseDisplacement() effect's optional `blur` prop (additional local blur in pixels) must be non-negative. This TypeError fires when an explicitly negative blur is provided, after resolve() applies the default of 0. Blur adds a softening effect to the displaced samples.
Source
Thrown at packages/effects/src/noise-displacement.ts:251
assertOptionalFiniteNumber(params.biasDirection, 'biasDirection');
assertOptionalFiniteNumber(params.biasAmount, 'biasAmount');
const r = resolve(params);
validateUnitInterval(r.center[0], 'center[0]');
validateUnitInterval(r.center[1], 'center[1]');
validatePositive(r.radius, 'radius');
validateUnitInterval(r.radius, 'radius');
if (r.strength < 0) {
throw new TypeError(
`"strength" must be >= 0, but got ${JSON.stringify(r.strength)}`,
);
}
validatePositive(r.grainSize, 'grainSize');
validatePositive(r.passes, 'passes');
validateMax(r.passes, MAX_PASSES, 'passes');
if (r.blur < 0) {
throw new TypeError(
`"blur" must be >= 0, but got ${JSON.stringify(r.blur)}`,
);
}
validateUnitInterval(r.feather, 'feather');
if (r.biasAmount < 0) {
throw new TypeError(
`"biasAmount" must be >= 0, but got ${JSON.stringify(r.biasAmount)}`,
);
}
};
const NOISE_DISPLACEMENT_VS = /* glsl */ `#version 300 es
in vec2 aPos;
in vec2 aUv;
out vec2 vUv;
void main() {View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Use a non-negative value: noiseDisplacement({ blur: 2 }) or blur: 0 for no blur.
- Clamp animated values: blur: Math.max(0, interpolatedValue).
- Omit blur to use the default of 0.
Example fix
// before
noiseDisplacement({ center: [0.5, 0.5], radius: 0.5, blur: -3 })
// after
noiseDisplacement({ center: [0.5, 0.5], radius: 0.5, blur: 3 }) Defensive patterns
Strategy: validation
Validate before calling
// Validate blur before calling noiseDisplacement()
if (params.blur !== undefined && params.blur < 0) {
throw new Error(`blur must be >= 0, got ${params.blur}`);
}
const result = noiseDisplacement(params); Prevention
- Use blur: 0 (or omit) for no blur — negative values are invalid.
- Clamp animated blur values with Math.max(0, value).
- Blur is in pixels, not a fraction — typical values are small (0–10).
When it happens
Trigger: Calling noiseDisplacement({ blur: -5 }) or any negative number for blur. blur: 0 is valid and is the default.
Common situations: Animation interpolation crossing zero into negatives; sign errors in computed values; misunderstanding blur as a directional parameter.
Related errors
- "${name}" must be a [number, number] tuple
- "${name}" must be an integer, but got ${JSON.stringify(value
- "${name}" must be greater than 0, but got ${JSON.stringify(v
- "${name}" must be <= ${max}, but got ${JSON.stringify(value)
- "strength" must be >= 0, but got ${JSON.stringify(r.strength
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/eeff7c079a3e7a65.
Report an issue: GitHub.