explaingit

krispuckett/swiftuishaders

Analysis updated 2026-05-18

164MetalAudience · developerComplexity · 2/5Setup · moderate

TLDR

A Swift package with 41 ready-made Metal visual effects you attach to any SwiftUI view with one modifier line.

Mindmap

mindmap
  root((SwiftUIShaders))
    What it does
      41 Metal effects
      SwiftUI view modifiers
      One-line to apply
    Tech stack
      Swift
      Metal
      SwiftUI
      Xcode
    Use cases
      Shimmer on images
      Glitch effects
      Book cover animations
    Audience
      iOS developers
      macOS developers

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a holographic shimmer or glitch effect to images in an iOS app.

USE CASE 2

Animate book covers or media thumbnails with liquid chrome or kaleidoscope effects.

USE CASE 3

Build a slider-based tuning UI for shader parameters using the included JSON spec.

What is it built with?

SwiftSwiftUIMetalXcodeSPM

How does it compare?

krispuckett/swiftuishadersradiofun/bottomgradientshadererikkaum/maxsim
Stars1642317
LanguageMetalMetalMetal
Setup difficultymoderateeasymoderate
Complexity2/52/54/5
Audiencedeveloperdeveloperresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires iOS 17 / macOS 14+ and must be built with Xcode, not the plain Swift CLI, because Metal shaders need the full toolchain.

In plain English

SwiftUIShaders is a Swift package containing 41 visual effects for iOS and macOS apps built with SwiftUI. The effects are written in Metal, which is Apple's low-level graphics language, and each one is wrapped in a SwiftUI view modifier so you can apply it to any image, text, or view with a single line of code. Examples include a holographic foil shimmer, kaleidoscope patterns, a glitch effect, neon edge highlighting, heat shimmer, liquid chrome, magnetic field lines, and a shatter animation, among many others. The author originally built these for a reading app called Epilogue, using them on book covers. The ones included here were kept because they looked good on real photographic content, effects that only worked on blank backgrounds or gradients were removed. The package requires iOS 17, macOS 14, or tvOS 17 and later, and must be built with Xcode rather than the plain Swift command-line tools because compiling Metal shaders requires the full Xcode toolchain. Most of the included effects are animated and run themselves using SwiftUI's timeline system, so you do not need to manage any timers. Each modifier has default parameter values that produce a good result with no arguments, and you can adjust individual parameters like intensity, speed, or color to tune the look. A JSON file in the repository describes all parameters for all shaders, and the project includes notes aimed at AI coding assistants explaining how to build a slider-based tuning interface using that data. Installing it uses Swift Package Manager. You add the repository URL in Xcode's package dependency panel or in a Package.swift file, then import SwiftUIShaders and call any modifier on a view. The package supports iOS, macOS, tvOS, and visionOS.

Copy-paste prompts

Prompt 1
Show me how to apply the holographic foil shimmer modifier to an Image view in SwiftUI using SwiftUIShaders.
Prompt 2
Help me install SwiftUIShaders with Swift Package Manager and import it into my Xcode project.
Prompt 3
Using the shader parameters JSON file, build a debug panel with sliders to tune the glitch effect.
Prompt 4
Explain why SwiftUIShaders needs to be built with Xcode instead of the Swift command-line tools.

Frequently asked questions

What is swiftuishaders?

A Swift package with 41 ready-made Metal visual effects you attach to any SwiftUI view with one modifier line.

What language is swiftuishaders written in?

Mainly Metal. The stack also includes Swift, SwiftUI, Metal.

How hard is swiftuishaders to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is swiftuishaders for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.