# 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/73a8f6e1c66c31ba1e2bb98d4a0877d10228e2090de01d66f6fc62a7b35aec25.mp4)

Video recorded in Legend Slides for macOS (development build).

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

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

## Use it in a deck

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

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

export const refraction = createRefractionShader();

# Refraction

<View style={{ width: 1696, height: 650 }}>
<Effect shader={refraction} strength={18} uniforms={{surfaceA: [0.1,0.1,0.4,0.8],surfaceB: [0.5,0.2,0.9,0.9]}} style={{width: 1696,height: 600}}><View style={{width: 1696,height: 600,backgroundColor: "#164e63",justifyContent: "center"}}><Text style={{color: "white",fontSize: 130}}>Light through glass</Text></View></Effect>
</View>
```

## Configure

**surfaceA / surfaceB**

Normalized region bounds.

**radii**

Corner radii for both regions.

**ramp**

Optional material-strength timeline.

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)
