Why is this displacement not creating a perfectly square cube? I'm attempting to use micropolygon displacement to displace a cube into a larger cube, in an attempt to wrap my head around this feature. As near as I can tell, the following should work. Take a cube with each face having UVs in the range -1 to 1, so that 0 is in the center of the face. Calculate the length of the UV, which should be in the range 0 to sqrt(2), and map that to 1 to sqrt(3). Use that as the displacement height. The cube is of course set to smooth shading.
The result is close to a cube, but off.
I would like to point out :

I think your math is off
You can get the length of a vector with a Vector Math node set to &quot;Length&quot;
The UV map vector Z coordinate is 0 (I think)

The resulting node tree would be :

But since the &quot;Displacement&quot; node pushes geometry along the normals, you can get rid of your UV map setup like so :