---
title: "gatherIrradiance"
description: "The light arriving at a pixel from a glowing shape edge, with the shape's body blocking it."
group: "light"
groupTitle: "Noise, light & materials"
categoryId: "radiance"
categorySlug: "radiance"
categoryTitle: "Radiance"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/paint/radiance.ts#L95"
---

# gatherIrradiance

The light arriving at a pixel from a glowing shape edge, with the shape's body blocking it.

```ts
gatherIrradiance(spec: GatherSpec): Expr
```

Import `radiance` from `shaders/std` and use `radiance.gatherIrradiance`.

Looks out from the pixel in `cones` directions, finds where each touches the shape, and averages the `emission` there. Edges facing away or hidden behind the body contribute nothing. Returns one number: the brightness at this pixel. It runs per pixel per frame, so prefer `irradianceField` unless the light must be live.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `spec` | `GatherSpec` |  |

## Example

```ts
const light = gatherIrradiance({origin: frame.sdfUV!, field: far.at, cones: 16, steps: 24, reach: 3, start: far.sdf, surfaceEps: px, jitter: hash, emission: ({normal}) => math.max(math.dot(normal, lightDir), 0), deps: [lightDir]})
```

> **Tip.** Any value computed outside `emission` and read inside it must be listed in `deps`.

## See also

- [`irradianceField`](/docs/primitives/radiance/irradiancefield) — The light spilling from a shape's edges, gathered once into a texture and read per pixel.
- [`shadowVisibility`](/docs/primitives/radiance/shadowvisibility) — How much of a light reaches a point, 1 when nothing is in the way and 0 when the shape blocks it.