Hi Robert,
Hi Sebastian,
Personally I'd subclass from osgTerrain::GeometryTechnique and pass a
FloatArray as a vertex attrib array or tex coord array and store the
heights there.
Okay, that would double the data then. I'm a bit nervous about adding
more vertex attributes as I already have a lot of data per vertex.
Is there any option where I could pass the ModelMatrix (not the
ModelViewMatrix) in a draw callback or something? The thing is that I
might need more than simply the height, but probably the complete
world-space vertex.
As I wrote before I guess the precision is lost when using the
osg_ViewMatrixInverse * ModelVIewMatrix, so moving this calculation to
the CPU would help a lot.
Robert.
On 4 December 2013 13:23, Sebastian Messerschmidt
<[email protected]
<mailto:[email protected]>> wrote:
Hi,
I have a osgDEM produced geocentric database.
I looked into the geometryTechnique implementation to see if I
somehow can access the height of the vertices above the ellipsoid
in the vertex shader.
Unfortunately I don't have any idea how to calculate this from the
give matrices. Is this information somehow available at all?
My plan is to overwrite some of the functionality in the
geometryTechnique to pass the appropriate matrices to the shader.
Anyone having an idea?
_______________________________________________
osg-users mailing list
[email protected]
<mailto:[email protected]>
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org