only write writeDepth