Better if I can make it procedurally so I can distort any image with this fake fisheye effect.
This is my best attempt:
It's somewhat similar, but you can see the curvature is not "convex" like the fisheye example.
Is there a better way?
#bind layer src? val=0 float #bind layer !&dst float @KERNEL { float ang = fit01(@src,0,M_PI/2); float result = @src * sin(ang); @dst.set(result); }
#bind layer src? val=0 float #bind layer !&dst float @KERNEL { float ang = fit01(@src,0,0.5); float result = @src * sinpi(ang); @dst.set(result); }
jlait
The problem is we did too good a job making VEX easy to write :>
jlaitThanks Jeff, that's awesome.
This is my go-to for references for raw OpenCL functions.
https://www.khronos.org/files/opencl-1-2-quick-reference-card.pdf [www.khronos.org]