/*{ "DESCRIPTION": "demonstrates the use of color-type image inputs", "CREDIT": "by zoidberg", "ISFVSN": "2.0", "CATEGORIES": [ "TEST-GLSL FX" ], "INPUTS": [ { "NAME": "inputImage", "TYPE": "image" }, { "NAME": "level", "TYPE": "float", "DEFAULT": 0.5, "MIN": 0.0, "MAX": 1.0 }, { "NAME": "lowColor", "TYPE": "color", "DEFAULT": [ 0.0, 0.0, 1.0, 1.0 ] }, { "NAME": "highColor", "TYPE": "color", "DEFAULT": [ 1.0, 1.0, 1.0, 1.0 ] } ] }*/ void main() { vec4 srcPixel = IMG_THIS_PIXEL(inputImage); vec4 dstPixel = ((srcPixel.r+srcPixel.g+srcPixel.b)/3.0>level) ? lowColor : highColor; gl_FragColor = dstPixel; }