finish DepthMode implementation