Effects
LEGEND APPSPreview

Refraction

Rounded glass regions refract and blur their captured content.

← All effects

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

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

---
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 →