---
title: "flareComposite"
description: "Closes a lens flare: turns the summed flare parts into the color to return from `paint`."
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#L794"
---

# flareComposite

Closes a lens flare: turns the summed flare parts into the color to return from `paint`.

```ts
flareComposite(total: Expr, flare: Expr): Expr
```

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

Pass the `additive` sum of the parts and the flare frame. The frame's intensity, edge fade and shimmer are applied here, and alpha comes from how bright the flare is.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `total` | `Expr` |  |
| `flare` | `Expr` |  |

## Example

```ts
return flareComposite(additive(ghosts, halo, starburst, streak, glare, core), flare)
```

## See also

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

## Used by

[LensFlare](/docs/components/lensflare)