/*{ "CATEGORIES": [ "Wipe", "Retro" ], "CREDIT": "Automatically converted from https://www.github.com/gl-transitions/gl-transitions/tree/master/heart.glsl", "DESCRIPTION": "", "INPUTS": [ { "NAME": "startImage", "TYPE": "image" }, { "NAME": "endImage", "TYPE": "image" }, { "DEFAULT": 0, "MAX": 1, "MIN": 0, "NAME": "progress", "TYPE": "float" } ], "ISFVSN": "2" } */ vec4 getFromColor(vec2 inUV) { return IMG_NORM_PIXEL(startImage, inUV); } vec4 getToColor(vec2 inUV) { return IMG_NORM_PIXEL(endImage, inUV); } // Author: gre // License: MIT float inHeart (vec2 p, vec2 center, float size) { if (size==0.0) return 0.0; vec2 o = (p-center)/(1.6*size); float a = o.x*o.x+o.y*o.y-0.3; return step(a*a*a, o.x*o.x*o.y*o.y*o.y); } vec4 transition (vec2 uv) { return mix( getFromColor(uv), getToColor(uv), inHeart(uv, vec2(0.5, 0.4), progress) ); } void main() { gl_FragColor = transition(isf_FragNormCoord.xy); }