---
title: "rayBands"
description: "Bright bands that travel along a coordinate, for aurora curtains or shimmering rays."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "light"
categorySlug: "light"
categoryTitle: "Light"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/light.ts#L46"
---

# rayBands

Bright bands that travel along a coordinate, for aurora curtains or shimmering rays.

```ts
rayBands(opts: {
    along: Expr
    frequency: Expr | number
    time: Expr | number
    speed: Expr | number
    phase?: Expr | number
    sharpness: Expr | number
}): Expr
```

Import `light` from `shaders/std` and use `light.rayBands`.

Returns a 0–1 field. `along` is the coordinate the bands cross (a uv axis, or a noise-warped one for organic rays), `frequency` the band count per unit of it, and `time` × `speed` how fast they travel. `sharpness` above 1 narrows the bright bands.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `opts` | `{
    along: Expr
    frequency: Expr \| number
    time: Expr \| number
    speed: Expr \| number
    phase?: Expr \| number
    sharpness: Expr \| number
}` |  |

## Example

```ts
const rays = rayBands({along: params.ctx.uv.member('x'), frequency: 12, time: animatedTime(params), speed: 0.3, sharpness: 2})
```

> **Tip.** Add a noise field to `along` before passing it and the straight bands turn into curtains.

## See also

- [`rayLobes`](/docs/primitives/light/raylobes) — Soft rays fanning out from the center of a radial frame, turning with the layer's clock.
- [`streakBand`](/docs/primitives/light/streakband) — One soft band across a single coordinate, peaking at `center`.

## Used by

[Aurora](/docs/components/aurora)