Fixed blending for 3 terrain textures.
This commit gives a better blending when there is >2 textures blending.