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.
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 #28current 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 factor0.53
which was giving something precise at~5%
at the time. Recently I noticed0.5
was much closer to the reality, which was not the case at the time.