---
title: "crispStroke"
description: "A clean outline of a shape, or a drawn curve, of a given width."
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#L104"
---

# crispStroke

A clean outline of a shape, or a drawn curve, of a given width.

```ts
crispStroke(opts: {distance: Expr; width: Expr | number; footprint: Expr | number}): Expr
```

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

`distance` is a signed distance to the shape's edge or to the curve. The stroke is centered on the edge and `width` wide, in the distance's units. `footprint` blends the stroke's own edges, as in `crispFill`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `opts` | `{distance: Expr; width: Expr \| number; footprint: Expr \| number}` |  |

## Example

```ts
const outline = mask.crispStroke({distance: shape.circle(x, y, radius), width: params.uniforms.lineWidth, footprint: px})
```

## See also

- [`crispFill`](/docs/primitives/mask/crispfill) — A clean fill of a shape: 1 inside, 0 outside.

## Used by

[Waveform](/docs/components/waveform)