---
title: "peelCompose"
description: "A finished page peel: the cast shadows, the flat page and the lit curl, layered back to front."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.blurs"
categorySlug: "effects-blurs"
categoryTitle: "Blurs, glows & screens"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/blurs.ts#L1437"
---

# peelCompose

A finished page peel: the cast shadows, the flat page and the lit curl, layered back to front.

```ts
peelCompose(frame: GatherFrame, parts: {
    shade: PeelShade
    sheen: PeelShade
    overhang: PeelShade
    reveal: PeelShade
}): SampleStage
```

Import `effects` from `shaders/std` and use `effects.blurs.peelCompose`.

The sampling stage of a peel. Pass the four shading terms built on the same frame. Wrap it in `gatherStack` with no overlays.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `frame` | `GatherFrame` |  |
| `parts` | `{
    shade: PeelShade
    sheen: PeelShade
    overhang: PeelShade
    reveal: PeelShade
}` |  |

## Example

```ts
effect: gatherStack(peelCompose(peel, {shade: curlShading(peel, {shading: 0.55}), sheen: curlSheen(peel, {highlight: 0.4, softness: 0.2}), overhang: overhangShadow(peel, {amount: p('amount'), shadow: 1}), reveal: revealShadow(peel, {amount: p('amount'), shadow: 1})}), [])
```

## See also

- [`peelFrame`](/docs/primitives/effects-blurs/peelframe) — The geometry of a page curling up from one corner: where the curl reads the child from, how far it has turned, and how far each pixel is from the crease.
- [`curlShading`](/docs/primitives/effects-blurs/curlshading) — The darkening in the crook of a curl, easing to full brightness at the lip.
- [`curlSheen`](/docs/primitives/effects-blurs/curlsheen) — The band of light running up a curl.
- [`overhangShadow`](/docs/primitives/effects-blurs/overhangshadow) — The shadow a lifted curl casts on the flat page just past the crease.
- [`revealShadow`](/docs/primitives/effects-blurs/revealshadow) — The shadow on the surface a peel reveals, just inside the crease.

## Used by

[PagePeel](/docs/components/pagepeel)