I wrote the original camera effect for Lapse, the photo app.
It's a lens simulation. Chromatic aberration with a separate offset per colour channel, blur, and barrel distortion, applied to the live camera feed so what you see in the viewfinder is already the look rather than something applied afterwards.
The frames come off the camera through AVFoundation as
CVPixelBuffers, and that's the shape of the whole interface — a pixel buffer and a
configuration go in, a processed pixel buffer comes out:
let effect = DistortEffect()
let config = EffectConfiguration(
aberration: Aberration(red: 0.0, green: 0.0, blue: 0.0),
blur: 0.0,
distortion: 0.0)
let newPixelBuffer = effect.apply(pixelBuffer: pixelBuffer, with: config)
The work itself is Metal. Keeping it to pixel buffers on both sides is what makes it drop into an existing capture pipeline without the host app having to care how it's implemented — it can hand over whatever the camera gave it and get back something it can preview, record or write out unchanged.
It shipped as an XCFramework, built for distribution, so Lapse's own team could add it as a binary Swift Package dependency and call three lines. That constraint shaped the API more than anything else — a framework someone else integrates has to be small enough to understand in one sitting, because you aren't there to explain it.