---
title: "modulate"
description: "Multiply light parts drawn in the same frame, such as a mask over a pattern."
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#L271"
---

# modulate

Multiply light parts drawn in the same frame, such as a mask over a pattern.

```ts
modulate(first: LightPart, ...rest: LightPart[]): LightPart
```

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

## Parameters

| Name | Type | Notes |
|---|---|---|
| `first` | `LightPart` |  |
| `...rest` | `LightPart[]` | Optional. |

## Example

```ts
modulate(rayLobes({count: 12, spin: -1, sharpness: 4}), glowPoint({sharpness: 6}), featherMask({radius: p('radius'), feather: 0.4}))
```

## See also

- [`withFrame`](/docs/primitives/light/withframe) — Evaluate a light part in a frame.
- [`additive`](/docs/primitives/light/additive) — Adds lights together, since light from several sources simply sums.

## Used by

[SunBurst](/docs/components/sunburst)