Fog of war / Line of sight

Do you mind sharing the general technique you used?