Computing z in vertex shader