====== Chroma Key ====== SrcMode.ChromaKey compares raw texel data against ChromaColor using ChromaMask: match = (LeftJustifiedRawTexelData & ChromaMask) == (ChromaColor & ChromaMask) A match makes the texel transparent and black. ChromaBlackYUV selects ARGB ''(0,128,16,128)'' instead of ''(0,0,0,0)''. Parallel draw suppresses matching pixels by clearing their byte enables. Mask and color placement depend on source format and SrcBGR. Eight- and sixteen-bit values need the replication specified in Table 4.14; RGB and BGR layouts differ. The [[registers:pixel-engine:pixel_chromacolor|ChromaColor]] and [[registers:pixel-engine:pixel_chromamask|ChromaMask]] pages include the individual source interpretations. ChromaKey must not be enabled with SrcFunc zero (no texture). It is unavailable for four-bit indexed textures. For indexed 1555 textures, TranspReject can reject transparent palette entries. The ChromaKey paragraph calls value ''0xA'' SrcFunc; SrcMode's field table assigns indexed 1555 to **SrcFmt = 0xA** and defines SrcFunc only from zero to three. Fill Engine ''cbltf'' uses a separate chroma-key control: format bit 7 and the replicated key in a2. See [[drawing:fill|Memory Fill Engine]]. Sources: [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=21|Technical Spec, p.21]], [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=30|Technical Spec, p.30]], [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=36|Technical Spec, p.36]], [[https://verite.3d32.org/_media/source/v2200spec.pdf#page=37|Technical Spec, p.37]]