---
title: "lensGhost"
description: "One ghost disc of a lens flare, the faint circles that line up across from the light."
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#L664"
---

# lensGhost

One ghost disc of a lens flare, the faint circles that line up across from the light.

```ts
lensGhost(slots: {intensity: ArgSpec; spread: ArgSpec; chroma: ArgSpec}): (flare: Expr, disc: [number, number, number, number], tint: [number, number, number, number], params: GpuFragmentParams) => Expr
```

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

Call the result once per ghost with the flare frame, a `disc` and a `tint`, and sum the calls with `additive`. `disc` is `[offset, size, brightness, hollow]`: how far along the axis from the light (scaled by `spread`), radius in aspect-corrected uv, brightness, and 0–1 for a solid disc to a ring. `tint` is `[r, g, b, phase]`, the color and a shimmer offset. `chroma` (0–1) adds a rainbow rim. Returns an RGB.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `{intensity: ArgSpec; spread: ArgSpec; chroma: ArgSpec}` |  |

## Example

```ts
const ghost = lensGhost({intensity: p('ghostIntensity'), spread: p('ghostSpread'), chroma: p('ghostChroma')})
const ghosts = additive(ghost(flare, [0.15, 0.20, 0.30, 0.10], [1.0, 0.95, 0.90, 0.0], params), ghost(flare, [0.30, 0.12, 0.25, 0.65], [1.0, 0.85, 0.55, 2.17], params))
```

## See also

- [`flareFrame`](/docs/primitives/light/flareframe) — The shared frame of a camera lens flare, which every `flare*` part reads.
- [`additive`](/docs/primitives/light/additive) — Adds lights together, since light from several sources simply sums.
- [`flareHalo`](/docs/primitives/light/flarehalo) — The rainbow halo ring of a lens flare, drawn across the canvas from the light.

## Used by

[LensFlare](/docs/components/lensflare)