Hi, Solkar: My SSCCE is as the attachment.Run the application, and drag the earth and release, the earth would rotate, and you'll see a red block shows near the right side, which indicates the coordinates I got is less than -1000000.Thanks. ------------------ Failure is the mother of success. Wu Zhicheng
------------------ Original ------------------ From: "Solkar Graphics";<[email protected]>; Date: Thu, Jul 3, 2014 03:05 PM To: "osg-users"<[email protected]>; Subject: Re: [osg-users] how to get the real world coordinates(x, y,z) in shader ttaw wrote: > No, the text node is parented to root,sibling with the earth node.I think if > osg_ViewMatrixInverse is from eye position, the result could also be about > -x000000 because gl_ModelViewMatrix*vertex is between -1 and 1, after > transforming to world coords, the value could be millions. It's a little hard to help you as long as long you neither provide details about how you examine your app and its data, nor post the respective code. Also a SSCCE (http://www.sscce.org/) (E.g a sphere to mock the your earth globe, a cube to mock the text node, and a plain toon shader that colorizes depending on magnitude of the respective coord ...) would not be hard to assemble, or would it? ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60119#60119 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org .
<<attachment: osgviewer_-_copy.zip>>
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

