- Code: Select all
/*{
"CREDIT": "Psyne",
"ISFVSN": "2.0",
"DESCRIPTION": "Strobes captured material every 1/2 second",
"CATEGORIES": [
"filter",
"strobe"
],
"INPUTS": [
{
"NAME": "inputImage",
"TYPE": "image"
},
{
"NAME": "capture",
"TYPE": "event"
}
],
"PASSES": [
{
"TARGET": "captureImage",
"PERSISTENT": true
}
]
}*/
void main() {
vec4 inputPixel = IMG_NORM_PIXEL(inputImage, isf_FragNormCoord);
if (capture == true || FRAMEINDEX == 0)
gl_FragColor = inputPixel;
else if (PASSINDEX == 1)
gl_FragColor = (fract(TIME) < 0.5) ? inputPixel : IMG_NORM_PIXEL(captureImage, isf_FragNormCoord);
else
discard;
}
What am I missing here? I'm a programmer by trade, have some experience with shaders, and have read the ISF spec, so please don't softball details!