I\'m using Gnomic Projection to project a part of an equirectangular image onto a flat surface. The following shader I found here does exactly that,
float angleOf