A GPU-accelerated image and video processing framework for Apple platforms built on Metal.
MetalPetal is a GPU-accelerated image and video processing framework built on Apple's Metal API for iOS, tvOS, and macOS. It provides a high-performance, extensible alternative to Core Image, enabling real-time filtering, blending, and effects with a modern Swift/Objective-C API. The framework handles optimizations like automatic caching and render graph minimization to deliver efficient processing.
iOS and macOS developers building apps that require real-time image or video processing, such as photo editors, camera filters, video players, or creative tools. It's ideal for those who need more control and performance than Core Image offers.
Developers choose MetalPetal for its superior performance over Core Image, fully customizable shaders, and a Swift-first API that simplifies filter composition. Its optimizations reduce memory usage and render passes, making it efficient for complex processing pipelines.
A GPU accelerated image and video processing framework built on Metal.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages Apple's Metal API for real-time image and video processing, with automatic optimizations like caching and render graph minimization to reduce memory and render passes.
Enables custom filter creation using Metal shaders, with support for multiple render targets (MRT) and complex render passes, as shown in the 'Build Custom Filter' section.
Provides a type-safe Swift API with the => operator for intuitive filter graph composition, enhancing developer experience for Swift programmers.
Includes a wide range of filters for color adjustment, blending, distortion, and blur, with community contributions like high-pass skin smoothing and CLAHE.
MTIContext can be safely shared across threads for concurrent rendering, improving efficiency in multi-threaded applications, as noted in concurrency considerations.
Filters relying on MetalPerformanceShaders, such as MPSGaussianBlurFilter, do not work on iOS Simulator, limiting testing options for certain effects.
Creating custom filters requires Metal shader knowledge and manual configuration of header search paths (e.g., MTL_HEADER_SEARCH_PATHS), adding development overhead.
The README admits that detailed performance comparisons with Core Image are lacking ('Detailed benchmark data needed'), making it harder to evaluate real-world advantages.
Developers must manually specify alpha types and color spaces during image creation and rendering, increasing complexity and risk of errors, as highlighted in dedicated sections.
MetalPetal is an open-source alternative to the following products: