For axis redefinition, only its past value can be used p.x = p.x - 1.; Or a more complex formula depending on several vector components: p.x = length(p.xyz) - 4.;
Sometimes you need to transform two vector components at once. For example, to convert to polar coordinates, p.x needs to get length(p.xy)-4. and p.y needs atan(p.y,p.x)/(PI*2.). And both these formulas depend on both p.y and p.x, meaning both values must be computed simultaneously. Otherwise changing one component of p, say p.x, would affect the subsequent computation of p.y. Fortunately in GLSL you can perform two transformations simultaneously:
p.xy = vec2(length(p.xy)-4., atan(p.y,p.x)/(PI*2.));
p.x = cylLarge(p); return cylSmall(p); https://bit.ly/3NNfiUT
We're essentially saying: changes in cylLarge value now pretend to be changes in p.x;