flowchart TD
F["one fragment covers
samples 0 and 1"] --> M["Metal runs the shader
once per covered sample"]
M --> C0["copy, sample_id 0
mask 0b0011"]
M --> C1["copy, sample_id 1
mask 0b0011"]
C0 --> G{"sample_id ==
ctz(mask)?"}
C1 --> G
G -- yes --> S["UAV stores, atomics,
ordered read-modify-write"]
G -- no --> H["treated as a helper:
stores skipped"]
C0 --> O["colour to sample 0"]
C1 --> O1["colour to sample 1"]