Hi,
the matrix multiplication in OpenSceneGraph works in reverse order.
Normally(for example in the shader) MVP = Projection * View * Model is the
right order, but in OSG its the other way arround.
If you get the same results for View * Projection and Projection * View, one of
your matrices is the identity matrix. Thats the only possible reason, because
matrix multiplication is a non-commutative operation. You should look into your
code if there is something wrong, when you setup the view matrix. Do you create
your matrices as osg::Matrixf or cast it before you pass it as a uniform? If
you use osg::Matrixd and create the uniform with "new
osg::Uniform("viewMatrix", viewMatrix);", you will get a dmat4 uniform instead
of mat4. You will not read the right matrix values in your shader if the
uniform is not setup properly.
Thank you!
Cheers,
Marcel
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=56894#56894
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org