Metaleon is a high-performance Metal-based image and video processing library for iOS that offers real-time filtering and visual effects.
- Image Filters: Apply professional-grade filters including lookup tables, vignette, blending, bilateral filters and more
- Visual Effects: Add dynamic effects like glitch, RGB spark, VHS, old film, chromatic aberration and many others
- Filter Chain: Easily create complex filter combinations with JSON-formatted filter descriptions
- Memory Optimization: Efficiently manages GPU resources using MTLHeap
- Real-time Processing: Designed for high-performance real-time camera and video processing
- Various customizable image filters with adjustable intensity
- Old Film
- VHS Camera/Tracking/Tape
- Chromatic VHS
- RGB Shift/Spark
- Glitch
- Trail
- Grid Effects
- Mirror Effects
- And many more
// Initialize a filter provider
let filterProvider = ImageFiltersProvider()
// Apply filter to a Metal texture
let filteredTexture = filterProvider.currentFilterChain?.encode(
to: commandBuffer,
sourceTexture: inputTexture
)
// Adjust filter intensity
filterProvider.updateParameters(with: 0.75)
// Switch between filters
filterProvider.next() // or .prev()
- iOS 14.0+
- Swift 5.7+
- Xcode 16.0+
dependencies: [
.package(url: "https://github.com/trilliwon/Metaleon.git", from: "1.0.0")
]
Metaleon is available under the MIT license. See the LICENSE file for more info.