added depth-based drawing