flowchart LR
vs["vertex shader
writes attr per vertex
(unchanged)"] --> rast["Metal rasterizer"]
rast -->|"no per-vertex inputs"| x["GetAttributeAtVertex(attr, i)
not expressible"]
rast --> lin["attr interpolated
without perspective"]
rast --> bary["no-perspective
barycentrics b"]
subgraph ps["start of the fragment shader (patch 0019)"]
direction TB
d["quad derivatives
dx, dy of attr and b"] --> solve["solve 2x2 system
E1, E2 = attr change per b1, b2"]
solve --> v["v0 = attr − b1·E1 − b2·E2
v1 = v0 + E1, v2 = v0 + E2"]
end
lin --> d
bary --> d
v --> use["attr_vertices[i]
error ≤ 6.7e-5 at 250"]