[osg-users] Wrong understanding of tangent space and world coordinates?

Andreas Schreiber ayss at online.de
Wed May 6 04:28:45 PDT 2015


I've got the following problem/question.

If I pass the following vector from osg code to the shader:

plane->getOrCreateStateSet()->addUniform(new osg::Uniform("object_position", osg::Vec4(1, -0.25, 1,1)));

This vector is in world space coordinates, correct?

Now if I want this vector in tangent space I create the tangent space matrix and multiply it with the given vector, correct?

To check if another vector, lets call it "test", hits the plane, which is created with the vector of object_position, I need to transform "test" also into tangent space, correct?

Hope someone can help me to figure out.

Thank you!


Read this topic online here:

More information about the osg-users mailing list