Shader fix

Distance was calculated based on whole vector, not on his x attribute
alone.