SceneCapture Depth as Texture

Ok yes it was the problem with alpha values > 1 because the depth was > 1 cm.
I fixed it by creating a second material using only the alpha channel (where the depth value is written), divide it by my maximum distance I want and LERP to get a white is close, black is far image:

To look at the result, I placed two planes, one using a material with the rgb color, one using the lastly created with depth:

Note that the TextureRenderTarget has the format “RTF RGBA32f”.