A SwiftUI library that adds paper-like visual effects to views using Metal shaders.
Add this package to your Xcode project (File > Add Package Dependencies), using this URL: "https://github.com/rafael-b-g/PaperShaders.git".
Start by importing the package: import PaperShaders
You can add paper grain using this modifier:
YourView()
.paperTexture()You can add print distortion (simulating ink printed on paper) using this modifier:
YourView()
.paperDistortion()Tip
You can adjust the effects with optional parameters inside each modifier.
This repository also includes PaperShadersDemo, a small (and very fun) demo app for previewing the shaders and tweaking their parameters.