remotion-dev/remotion · error · TypeError
"biasAmount" must be >= 0, but got ${JSON.stringify(r.biasAm
Error message
"biasAmount" must be >= 0, but got ${JSON.stringify(r.biasAmount)} What it means
The noiseDisplacement() effect's optional `biasAmount` prop (directional pull multiplier relative to strength) must be non-negative. This TypeError fires after resolve() applies the default of 0. Note that biasAmount is also constrained to <= 1 via the schema, but the runtime check here only guards the lower bound.
Source
Thrown at packages/effects/src/noise-displacement.ts:258
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() {
vUv = aUv;
gl_Position = vec4(aPos, 0.0, 1.0);
}
`;
const NOISE_DISPLACEMENT_FS = /* glsl */ `#version 300 es
precision highp float;View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Use a non-negative value: noiseDisplacement({ biasAmount: 0.5 }) or biasAmount: 0 to disable bias.
- To change bias direction, adjust biasDirection (in degrees) rather than using negative biasAmount.
- Clamp animated values: biasAmount: Math.max(0, interpolatedValue).
- Omit biasAmount to use the default of 0.
Example fix
// before
noiseDisplacement({ center: [0.5, 0.5], radius: 0.5, biasAmount: -0.3 })
// after
noiseDisplacement({ center: [0.5, 0.5], radius: 0.5, biasAmount: 0.3, biasDirection: 90 }) Defensive patterns
Strategy: validation
Validate before calling
// Validate biasAmount before calling noiseDisplacement()
if (params.biasAmount !== undefined && params.biasAmount < 0) {
throw new Error(`biasAmount must be >= 0, got ${params.biasAmount}`);
}
const result = noiseDisplacement(params); Prevention
- Use biasDirection (degrees) to control the direction of bias, not negative biasAmount.
- Set biasAmount: 0 (or omit) to disable directional bias entirely.
- Clamp animated biasAmount values with Math.max(0, value).
When it happens
Trigger: Calling noiseDisplacement({ biasAmount: -0.5 }) or any negative number for biasAmount. biasAmount: 0 is valid and disables directional bias.
Common situations: Animation interpolation going negative; sign errors; expecting negative biasAmount to reverse the bias direction (use biasDirection in degrees for directional control instead).
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/3dad8fe3a0c77168.
Report an issue: GitHub.