Chroma Keying

I ported a chroma keying shader from Nvidia’s CG shading language to OpenGL for use in Codea a week or two ago and thought I’d share it. Enjoy!

Tap on the image to choose a color, use the bg parameter to change what to replace it with, and use the min and max distance sliders to change how close the two colors must match.

Original code

View port via GitHub

View port via Pastebin