Skip to content
forked from Treata11/iShader

A collection of Metal Shaders to empower SwiftUI

Notifications You must be signed in to change notification settings

Keith-43/iShader

 
 

Repository files navigation

Notice

This fork of iShader has been specifically optimized for use with the Book iShader sample project. In this version, Metal resources are directly copied and not precompiled or processed like in the original package.

iShader

iShader is a collection of open-source shaders written in Metal targeted for SwiftUI projects. The package is organized into different submodules based on use cases & functionality of shaders:

AudioVisualizer

Shaders in this module are designed to respond to changes in sound frequencies. The shaders in this section are primarily designed for non-scientific purposes. It's written to look responsive and aesthetic when used to visualize music.

ColorEffect

ColorEffect shaders act as a filter effect on the color of each pixel. You've probably used them many times editing a photo taken with your phone.

DistortionEffect

DistortionEffects manipulate the location of each pixel. Seen in many Video editing tools.

LayerEffect

Very similar to ColorEffect, but much more powerful. These shaders are capable of sampling a SwiftUI layer at location(s) derived from any position and then applying some kind of transformation to produce a new color.

ShaderArt

Art using pure math! The results are mesmerizing.

Transition

A Transition is an animation that smoothly animates the intermediary steps between 2 SwiftUI Views.

See it in action

Book iShader is a sample project, demonstrating all of the metal shaders of the library, in SwiftUI Views.

Resources

The majority of the shaders were sourced from platforms such as ShaderToy and GL-Transition, and subsequently adapted for Metal. Prior to inclusion in iShader, it was ensured that the original codes were published under permissive licenses. Links to the original sources are provided in the header of each file.

About

A collection of Metal Shaders to empower SwiftUI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Metal 71.9%
  • Swift 28.1%