/*{ "CATEGORIES": [ "Wipe" ], "CREDIT": "Automatically converted from https://www.github.com/gl-transitions/gl-transitions/tree/master/circle.glsl", "DESCRIPTION": "", "INPUTS": [ { "NAME": "startImage", "TYPE": "image" }, { "NAME": "endImage", "TYPE": "image" }, { "DEFAULT": 0, "MAX": 1, "MIN": 0, "NAME": "progress", "TYPE": "float" }, { "DEFAULT": [ 0, 0, 0, 1 ], "NAME": "backColor", "TYPE": "color" }, { "DEFAULT": [ 0.5, 0.5 ], "MAX": [ 1, 1 ], "MIN": [ 0, 0 ], "NAME": "center", "TYPE": "point2D" } ], "ISFVSN": "2" } */ vec4 getFromColor(vec2 inUV) { return IMG_NORM_PIXEL(startImage, inUV); } vec4 getToColor(vec2 inUV) { return IMG_NORM_PIXEL(endImage, inUV); } // Author: Fernando Kuteken // License: MIT vec4 transition (vec2 uv) { float distance = length(uv - center); float radius = sqrt(8.0) * abs(progress - 0.5); if (distance > radius) { return backColor; } else { if (progress < 0.5) return getFromColor(uv); else return getToColor(uv); } } void main() { gl_FragColor = transition(isf_FragNormCoord.xy); }