---
title: "softBand"
description: "A soft band around a line, sharp on one side and long on the other."
group: "space"
groupTitle: "Shapes, frames & warps"
categoryId: "mask"
categorySlug: "mask"
categoryTitle: "Masks"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/mask.ts#L35"
---

# softBand

A soft band around a line, sharp on one side and long on the other.

```ts
softBand(opts: {
    distance: Expr
    below: {from: Expr | number; to: Expr | number}
    above: {from?: Expr | number; to: Expr | number}
}): Expr
```

Import `mask` from `shaders/std` and use `mask.softBand`.

`distance` is the signed distance from the line: negative below it, positive above. Coverage rises from 0 to 1 as the distance crosses `below.from` to `below.to`, then falls back to 0 as it crosses `above.from` (default 0) to `above.to`. The shape under curtains, horizons and underlines.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `opts` | `{
    distance: Expr
    below: {from: Expr \| number; to: Expr \| number}
    above: {from?: Expr \| number; to: Expr \| number}
}` |  |

## Example

```ts
const curtain = mask.softBand({distance: sub(uv.member('y'), pathY), below: {from: -0.04, to: 0.015}, above: {to: height}})
```

## See also

- [`softDisc`](/docs/primitives/mask/softdisc) — A filled disc with a soft, shaped edge.
- [`crispStroke`](/docs/primitives/mask/crispstroke) — A clean outline of a shape, or a drawn curve, of a given width.

## Used by

[Aurora](/docs/components/aurora)