The simple answer is the partial pressure of nitrogen being breathed. The deeper a diver goes, the greater the partial pressure of nitrogen in the air being breathed due to the increased pressure...
When a diver returns to a safe depth, the effects of nitrogen narcosis disappear completely. Some evidence exists that certain divers may become partially acclimated to the effects of nitrogen...