Clean up shader code some more

In preparation for proper support for "masks to bounds" clean up the shader code. This will make it easier to fiddle with the vertex coordinates.