[osg-users] View Returns wrong value in computeIntersection with shaders on

2012-01-12 Thread Hong Zhenyang
Hi,

Im trying to program a game to track objects with effects like in night Vision 
and such and Im using shaders with tint and noise programs to create the effect 
of night vision.  

With no shaders on, I could track my tank perfectly.  However, With shaders on, 
the hit result is off by  quite a bit.  The way I compute intersect is by 
querying the terrain position with which I could get my tank locations.  The 
terrain and the shader both attach to the viewer directly.  The nodeMask for 
both terrain and the shader is different.  ComputeIntersection is calculated 
based on the mouse positioning.  Setting a different mask for the tank does not 
give me back useful tank result.

ANy hints onto what I could have done wronly?

 Thank you!

Cheers,
Hong Zhenyang

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=44683#44683





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] View Returns wrong value in computeIntersection with shaders on

2012-01-12 Thread Chris 'Xenon' Hanson
On 1/6/2012 9:03 PM, Hong Zhenyang wrote:
 ANy hints onto what I could have done wronly?

  Obviously, we should ask -- your vertex shaders aren't modifying the vertices 
at all, right?

-- 
Chris 'Xenon' Hanson, omo sanza lettere. xe...@alphapixel.com 
http://www.alphapixel.com/
  Digital Imaging. OpenGL. Scene Graphs. GIS. GPS. Training. Consulting. 
Contracting.
There is no Truth. There is only Perception. To Perceive is to Exist. - 
Xen
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org