Projection of speckle patterns for 3D sensing