Effects
LEGEND APPSPreview
Refraction
Rounded glass regions refract and blur their captured content.
All effectsRecorded in Legend Slides for macOS (release build).
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
---
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 →