mirror of
https://github.com/libretro/slang-shaders.git
synced 2024-06-02 19:38:36 -04:00
there were an undefined function, fixed
This commit is contained in:
parent
0a741ee7a2
commit
6f07bfbb4e
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue