Adding ghost depth functionality