I found similar questions in the forum, but no answer seems to work.
I need to save the depth buffer in an image, in order to do that, I’m using a CaptureComponent2D with the Capture Source set as “SceneDepth in R” and this is the code I use:
I tried all combination of ERGBFormat and bitDepth, the only combo that doesn’t crash the editor is GrayF 32 or GrayF 16, but this results in an empty EXR file.
As a side note, with the same code, I am able to save FinalColor in RGB or DeviceDepth in RGB, with a different ERGBFormat clearly.
From what I can see, everybody is using a similar code, so I am not sure what I’m doing wrong or maybe I’m not interpreting the meaning of these settings in the right way.