The first line of the main function within the fragment shader expands the texture coordinates to a 3D (homogeneous) value with a z coordinate of zero (s, t, 0, 1), and then transforms the value via the Slice matrix. This matrix can scale, translate, and/or rotate the texture coordinates to define the 2D region of the virtual log.
Next, the distance from the ...