File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -291,6 +291,9 @@ if (typeof p5 !== "undefined") {
291291 * callbacks. It is commonly used to create soft transitions, smooth edges,
292292 * fades, and anti-aliased effects.
293293 *
294+ * Smoothstep is useful when a threshold or cutoff is needed, but with a
295+ * gradual transition instead of a hard edge.
296+ *
294297 * - Returns `0.0` when `x` is less than or equal to `edge0`
295298 * - Returns `1.0` when `x` is greater than or equal to `edge1`
296299 * - Smoothly interpolates between `0.0` and `1.0` when `x` is between them
@@ -318,7 +321,7 @@ if (typeof p5 !== "undefined") {
318321 * let x = inputs.texCoord.x;
319322 *
320323 * // smoothstep creates a soft transition instead of a hard edge
321- * let t = smoothstep(0.45 , 0.55 , x);
324+ * let t = smoothstep(0.25 , 0.35 , x);
322325 *
323326 * // Use t directly as brightness
324327 * return [t, t, t, 1];
You can’t perform that action at this time.
0 commit comments