Visibility algorithm
Merge commit 'a3e8891903c5df8d2571d9c68ea95ea15468e518'