Skip to content

trilliwon/Metaleon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metaleon

Metal License

Metaleon is a high-performance Metal-based image and video processing library for iOS that offers real-time filtering and visual effects.

Features

  • 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

Sample Filter

Supported Effects

Image Filters

  • Various customizable image filters with adjustable intensity

Visual Effects

  • Old Film
  • VHS Camera/Tracking/Tape
  • Chromatic VHS
  • RGB Shift/Spark
  • Glitch
  • Trail
  • Grid Effects
  • Mirror Effects
  • And many more

Usage

// 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()

Requirements

  • iOS 14.0+
  • Swift 5.7+
  • Xcode 16.0+

Installation

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/trilliwon/Metaleon.git", from: "1.0.0")
]

License

Metaleon is available under the MIT license. See the LICENSE file for more info.

About

GPU-accelerated image and video processing powered by Metal

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages