With Variablur, you can create variable blur effects that you control with a mask. Because you draw the mask using a
GraphicsContext, it can contain gradients, shapes, text, pre-rendered images, or anything else you can draw into a
You can create gradient or progressive blurs, vignettes, “blur shadows”, or many other effects.
- The blur radius is controlled per pixel for a true variable gaussian blur effect
- Variablur uses 100% public API – it’s just a Metal shader and a couple extensions to SwiftUI types
- In my testing it runs smoothly even when applied to large, animated views or combined with other shaders. If performance is an issue, there’s an option to lower the sample count. That said, I’m sure it could be optimized further and would be grateful for a PR that improves performance.
- SwiftUI’s visual effects can only be applied to pure SwiftUI views, and this library shares that limitation.
To see live examples of various effects you can achieve with different masks, clone this repository, open it in Xcode, and look in
Sources/Variablur/View+variableBlur.swift for Xcode previews.
Usage with Swift Package Manager
Add Variablur to your project:
Mobile App Development Trends – 29.02
Working with dates and Codable, Fun with shapes in Compose, The missing guide to deep linking and more!
The open source StarCoder 2 model runs on regular GPUs
Companies are making more and more artificial intelligence-based code generators at an astonishing rate – services like GitHub Copilot and...
Google TV updates the homescreen
You may notice your apps taking a different shape on your Google TV For You screen.
Decompose – Kotlin Multiplatform lifecycle-aware business logic components with routing and pluggable UI
Decompose is a Kotlin Multiplatform library for breaking down your code into tree-structured lifecycle-aware business logic components (aka BLoC), with...
Mobile App Development Trends – 28.02
How to use VariadicView, Comprehensive Guide To Kotlin Context Receiver, OWASP Mobile Top 10 and more!
GitHub opens access to Copilot Enterprise
Copilot Enterprise includes all the features of the existing Business plan, including intellectual property indemnification, but extends it with a...