Timeline for Direct3D - ways to retrieve world position from depth buffer without matrix information
Current License: CC BY-SA 3.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Sep 27, 2017 at 18:12 | comment | added | Apollo13 | Ok, according to another post I should be able to reconstruct the projection matrix from the frustum values (I have access to left angle, right angle, top angle, bottom angle, near plane, far plane) Is this enough? I calculated the near plane vertices and used those with this template: songho.ca/opengl/files/gl_projectionmatrix_eq16.png But apparently this is wrong - my depth values are just black and white (no grey pixels) afterwards... | |
Jun 2, 2017 at 9:10 | comment | added | Apollo13 | Ok, thank you again for your advice. Didn't think this justifies a new question ;) | |
Jun 2, 2017 at 9:08 | vote | accept | Apollo13 | ||
Jun 1, 2017 at 13:14 | comment | added | Maximus Minimus | @Apollo13 - I suggest asking that as a separate question in it's own right; SE comments are primarily intended for clarifications rather than for extended discusions or follow-up Q&As (SE differes from discussion forums in this regard) so you'll get better attention, better answers and no risk of moderator intervention by asking another question. | |
Jun 1, 2017 at 12:58 | comment | added | Apollo13 | This is very helpful, thanks a lot! From what I've seen so far concerning the game API, I don't expect the developers to use any standard way, even if there was one ... One additional question is left though: the depth buffer contains values in range [0,1]. If I manage to retrieve the necessary information to recreate the transformation matrix/matrices via game API, may I combine those with the depth values? Or does the depth buffer only contain garbage and I have to get the depth values from somewhere else as well? | |
Jun 1, 2017 at 11:03 | history | answered | Maximus Minimus | CC BY-SA 3.0 |