# Refraction

Rounded glass regions refract and blur their captured content.

Source: https://legend.so/slides/effects/refraction/

Legend Slides: Preview.

[All effects](https://legend.so/slides/effects/)

[Refraction preview](https://legend.so/slides/effects/previews/refraction/04b58cf69000d8a98c15a750304f18a69497f9bb84ab42597ccbe5c4c92b516b.mp4)

Recorded in Legend Slides for macOS (release build).

[Install in Slides](legend-slides://effects/install?pack=materials&version=1.0.2) [Open example](legend-slides://effects/example?effect=refraction) [Download example](https://legend.so/slides/effects/examples/refraction/2fd2df874b100e1f2eccc001fa3943417a4790bf61fbfd0c234f163ad0491a65.mdx)

Requires a Legend Slides build with effect installation support. Installs the materials pack (1.0.2, 41 KB source) and its dependencies. macOS host capabilities: reanimated, skia, webgpu. Installed decks work offline.

## Use it in a deck

refraction.mdx

```mdx
---
title: Refraction
---

import { View, Text } from "react-native";
import { createRefractionShader } from "slides:materials/Refraction";

export const refraction = createRefractionShader({ intensity: 0.45 });

# Refraction

<View style={{ width: 1696, height: 650 }}>
<Effect shader={refraction} strength={18} uniforms={{ surfaceA: [0.08, 0.12, 0.38, 0.82], surfaceB: [0.58, 0.16, 0.92, 0.84] }} style={{ width: 1696, height: 600 }}><View style={{ width: 1696, height: 600, backgroundColor: "#164e63", justifyContent: "center", alignItems: "center" }}><Text style={{ color: "white", fontSize: 102 }}>Light through glass</Text></View></Effect>
</View>
```

## Configure

**surfaceA / surfaceB**

Normalized region bounds.

**radii**

Corner radii for both regions.

**ramp**

Optional material-strength timeline.

**intensity**

0–1; defaults to 1, preserving the existing appearance.

Only imported effects enter the compiled deck. [Installation and versioning →](https://legend.so/slides/effects/installation/)

[View Markdown](https://legend.so/slides/effects/refraction.md)[Report a documentation correction](https://github.com/LegendApp/legend-docs/issues/new?title=Docs%3A+Refraction&body=Page%3A+https%3A%2F%2Flegend.so%2Fslides%2Feffects%2Frefraction%0A%0AWhat+is+incorrect+or+missing%3F%0A%0AExpected+behavior+or+supporting+source%3A%0A)
