there were an undefined function, fixed

This commit is contained in:
Antonio Orefice 2024-05-19 12:27:36 +02:00
parent 0a741ee7a2
commit 6f07bfbb4e

View file

@ -34,15 +34,14 @@ vec2 tl_warp(vec2 pos)
* protrusion is the rounded shape near the middle
* keep protrusion higher than ~0.5
*/
vec2 Warp_koko(vec2 co, vec2 w, float protrusion) {
vec2 Warp_koko_new(vec2 co, vec2 w, float protrusion) {
float czoom = 1 - distance(co, vec2(0.5));
czoom = mix(czoom, czoom * protrusion, czoom);
vec2 czoom2d = mix(vec2(1.0), vec2(czoom), w);
vec2 coff = mix( vec2(0.0), vec2(0.625), w);
return zoomxy(co, coff + czoom2d );
return 0.5 + (co - 0.5) / (coff + czoom2d);
}
// cgwg's geom
// license: GPLv2