Output depth map to file

  • Posts: 4
1 year 2 months ago #1 by IlYA
Hi, tell me how to display the depth map is not on the screen and in the file.

Please Log in or Create an account to join the conversation.

  • Posts: 206
1 year 2 months ago #2 by Duran.te
Just download the effect " DisplayDepth.fx " from Reshade's installer or from the official GitHub repository and, once in game, activate it.

Please Log in or Create an account to join the conversation.

  • Posts: 4
1 year 2 months ago #3 by IlYA
I need a depth map with great accuracy, if I take a screenshot, then I will get an accuracy of 8 bits. What should I add to the file DisplayDepth.fx to save the depth map to a file?

Please Log in or Create an account to join the conversation.

  • Posts: 176
1 year 2 months ago #4 by Daodan

IlYA wrote: What should I add to the file DisplayDepth.fx to save the depth map to a file?


It is not possible for a shader to save an image.

The only way to save (screenshot) the depth buffer in it's native format is to add an image format to ReShade that can use more than 8 bits per channel (e.g. openEXR).

Please Log in or Create an account to join the conversation.

  • Posts: 4
1 year 2 months ago #5 by IlYA
Do I need to modify the ReShade project? I would be very grateful if you could help me with this. I don't know how to do it well enough.

Please Log in or Create an account to join the conversation.

  • Posts: 176
1 year 2 months ago #6 by Daodan
If we take OpenEXR as an example you would need to add that repo (and some of its dependencies) as a submodule to the ReShade Visual Studio project. Then you can use the OpenEXR API to save a screenshot (even as floating point). Unfortunately I can't help you with that as I have no extended knowledge of Visual Studio and ReShade (other than some GUI stuff).

Please Log in or Create an account to join the conversation.