Non linear - scene depth to render target

I’m doing a depth camera. i made this post process material

This is kinda working, when i apply it to a scene capture the relation between distance and the pixel value is not linear. For example, the max range is 700 cm, a object at 350 cm distance is represented as a 187 pixel value, but should be 127.

If i spawn a CameraActor in the scene and apply the same mateiral with an object at the same distance, the image pixels is the expected 127.

Anyone knows how to make the scene capture also linear? Thank you in advance!

I think i got it, it was the gamma correction on the render target. I set the TargetGamma to 1 and the relation became linear. the final pixel value is some thing like originalPixel^(1/TargetGamma) and the default value is 2.2