Feature Request: Generic Depth - combine 2 buffers (one per eye)

  • Zolbat2
  • Topic Author
More
6 months 3 weeks ago #1 by Zolbat2 Feature Request: Generic Depth - combine 2 buffers (one per eye) was created by Zolbat2
I've encountered a problem in "DCS World" where the depth buffers are rendered per eye.
The Generic Depth addon can only select one buffer, which is expected to contain both eye's viewports. Selecting one of the "working" buffers stretches them across both eyes, as seen in this picture with a depth-buffer based ambient occlusion:
DCS World - The ambient occlusion effect is stretched.

Since depth buffers for both eyes exist, it'd be great to have the ability to combine them into a single DEPTH-Texture (or as a workaround expose a second "DEPTH_2" Texture which can be used in shaders/effects.

I've mocked up how the selection could look:

 The "VR: Use separate buffers for each eye" checkbox could also be omitted, so having "left" and "right" checked for the same buffer would just keep the behavior as it currently is (single buffer for both eyes).
 

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

  • The Iron Wolf
More
6 months 2 days ago - 6 months 2 days ago #2 by The Iron Wolf Replied by The Iron Wolf on topic Feature Request: Generic Depth - combine 2 buffers (one per eye)
Great idea, but some games use single depth buffer overwriting left buffer with the right eye data eventually. I recently made this work for an old game called GTR2 (after crosire suggested I implement my own addon for this). That was not straightforward without additional code running in the game I could not catch the point where left eye rendering was done...  I think game is clearing depth by ovewriting it.  Probably possible to do entirely in the addon, by examining draw events ant catching the moment where game clears depth by drawing skybox into it, but what I am trying to say this stuff may require different approach for each game.  Another thing to note is that not all APIs are equally powerful in terms of what can they do with the depth buffer.  What is possible in Vulkan (or via DXVK) may not be possible in DX9, for example.
Last edit: 6 months 2 days ago by The Iron Wolf.

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

  • Zolbat2
  • Topic Author
More
5 months 2 weeks ago #3 by Zolbat2 Replied by Zolbat2 on topic Feature Request: Generic Depth - combine 2 buffers (one per eye)
Interesting, I assumed if the individual buffers for left and right were selectable in the addon, it would be possible to extract them both during the same frame and stitch them together.

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

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.