Real-Time Camera Inversion on Metal: Inside ReverseWorldGo's Vision Pipeline

The five-stage GPU pipeline that flips your camera feed in under 16 milliseconds, on every iPhone since the A12.

ReverseWorldGo is a puzzle game that asks players to see the world backwards. The camera is the controller, and inversion is the verb. What sounds like a one-line Core Image filter turned into a six-month engineering project because the moment you put a full-resolution live preview behind it, the frame budget collapses from sixty to nine frames per second. This post is the story of how we rebuilt the inversion pipeline on Metal, what it cost us in late nights, and the five mistakes that taught us the most.

1. Why Metal, Not Core Image

Our first implementation used CIFilter with a custom CIKernel and the framework's automatic Metal-backed renderer. It worked on paper. It also ran at nine frames per second on an iPhone 12 mini, and the thermal throttling curve meant that by minute three of a session the framerate dropped into single digits. The bottleneck was not the inversion itself — it was the implicit copy between the CVPixelBuffer from AVCaptureSession and the CIImage that Core Image wanted to render.

Mixture-of-Experts architecture and multimodal spatial perception
Mixture-of-Experts architecture and multimodal spatial perception

Metal removes that copy. A CVMetalTextureCache lets you wrap a CVPixelBuffer as a MTLTexture without copying the underlying pixel memory, and a compute kernel can read from that texture, write to a second texture, and present in a single GPU dispatch. The latency budget drops from a frame-and-a-half to a sub-frame, and the power envelope stays inside the thermal headroom of every A-series chip we support.