// zoomInOut — GLSL ES 3.00, generated from https://github.com/gl-transitions/gl-transitions/blob/master/transitions/zoomInOut.glsl // Author: OllyOllyOlly // License: MIT // Description: Zooms into the outgoing image until it blurs into a flat color, then out to the incoming one // Tags: zoom, blur vec2 zoom(vec2 uv, float amount) { return 0.5 + ((uv - 0.5) * (1.0 - amount)); } vec4 transition (vec2 uv) { float zoomFrom = smoothstep(0.0, 1.0, progress * 2.0); float zoomTo = smoothstep(0.0, 1.0, (1.0 - progress) * 2.0); float crossfade = smoothstep(0.4, 0.6, progress); return mix( getFromColor(zoom(uv, zoomFrom)), getToColor(zoom(uv, zoomTo)), crossfade ); }