peelCompose

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

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

NameTypeNotes
frameGatherFrame
parts`{
shade: PeelShade
sheen: PeelShade
overhang: PeelShade
reveal: PeelShade

}` | |

Example

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 — 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 — The darkening in the crook of a curl, easing to full brightness at the lip.
  • curlSheen — The band of light running up a curl.
  • overhangShadow — The shadow a lifted curl casts on the flat page just past the crease.
  • revealShadow — The shadow on the surface a peel reveals, just inside the crease.

Used by

PagePeel