Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad depth for the point retreived with View.ptat #32

Closed
jimy-byerley opened this issue Mar 20, 2022 · 1 comment
Closed

bad depth for the point retreived with View.ptat #32

jimy-byerley opened this issue Mar 20, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jimy-byerley
Copy link
Owner

description

When using View.ptat() to get the 3d position on an object of the screen, the point is well placed on the screen from the point of view of the camera, but doest have the correct depth, resulting in a point much farther the pointed surface.
This issue is more described in #28

current resolution state

For the implementation of ptat I relied on the OpenGL internal depthmap to get the view-object distance, and then recover the 3d position with the view perspective informations. But for some reasons OpenGL is giving me incorrect values (not conform to what the specifications I read says). So I experimentally patched the wrong depth value with a factor 0.53 which was giving something precise at ~5% at the time.
Recently I noticed 0.5 was much closer to the reality, which was not the case at the time.

@jimy-byerley jimy-byerley added the bug Something isn't working label Mar 25, 2022
@jimy-byerley
Copy link
Owner Author

I didn't seen this problem for a while now, This was surely solved I don't know how by some changes in the shaders at some point ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant