remapping Z depth near-far distance

Hi all.
I’m trying to change a greyscale zdepth map in order to “move” the black point farther. The map has been calculated in 3dsmax, using the logic black-near, white-far.
I’d just like to easily move the in-focus point, as I do in photoshop’s lens blur.
Is there a way? I tried using rgb curves, but the result is jagged - any hint? Thanks!