On-going list of point deformations using point wrangles. To be continued.
vector pos_sphere = chv('position_sphere');
float r = chf('radius_sphere');
vector pos_hit = v@P;
vector pos_ray = pos_hit;
vector dir_ray = {0,0,-1};
float t = dot(pos_sphere - pos_ray, dir_ray);
vector p = pos_ray + dir_ray * t;
float y = length(pos_sphere - p);
if(y < r){
float x = sqrt(r*r - y*y);
pos_hit = pos_ray + dir_ray * (t - x);
}
v@P.z = lerp(v@P.z, pos_hit.z, f@mask);