dynamic color key wityh RC ?

hello to all and a Happy New Year !

it’s just came up to me… is it possible to do dynamic color keying just using register combiners? any clues?

Use DOT3 and alpha test.

SPARE0=Incoming color - Key color
SPARE1=SPARE0 DOT3 SPARE0

Then use mux to do a conditional assignment to the alpha channel of output. If the result of the dot product is zero, the incoming color is exactly the color key. You’d assign zero then (or anything else that fails the alpha test). Otherwise assign full alpha (or whatever you need).

You can extend to ranged chroma keying by adding some threshold to the result of the dot product before muxing but it will consume yet another general combiner.

Good luck.

thanks, I just tried out…
it’s kinda tricky using pure API (opengl), but it works…
thanks