18.8 · Extents, working colour space, and a compute pass from start to finish

Core Image and Metal are lazy and asynchronous: the surprises come from regions you did not know a filter had, and from work that has not run yet.

Mental model. Both build a recipe first and run it later. Bugs live in what the recipe covers and in when it actually executes.

Core Image

Extents and the coordinate system, and the colour space the maths runs in.

  1. What is a CIImage extent, why is a generator infinite, and why do blurred edges look wrong or the image grow? 18.8.1 · L5
    A CIImage is a recipe with an extent, the rectangle where it can be non-transparent, in Core Image’s coordinate space whose origin is the bottom-left (the…
  2. Which colour space does Core Image blend in by default, and how does that change a simple alpha blend? 18.8.2 · L5
    A default CIContext works in extended linear sRGB with half-float RGBA (the check prints both). Inputs are converted into it, filters run, and the output is…

Metal

A complete compute pass and what to check.

  1. What are the steps of a Metal compute pass, what runs when, and what can you verify without a GPU frame? 18.8.3 · L5
    The chain is: MTLDevice (nil means no Metal), a library (from .metal files in the bundle, or makeLibrary(source:) at run time as in the check), a function, a…

More in Media & graphics