Hi Community, I have F+ lighting system and I am about to "integrate" projected textures to act as lights instead of the original physics based lighting. I have managed to have the projected textures to work nicely and the only thing left is light (the projected texture) attenuation to fully simulate lights.
The shaders are very simple ( I can post them here if needed ). The thing that hurts my head is the construction of the texture matrix - I am updating it via uniform update callback where the computation is done, it is something like: osg::Matrixf m = osg::Matrixf::inverse(worldMatrix) * viewMatrix * osg::Matrixf::perspective(120, 1.0, 0.001, 10); For reasons I guess the far/near planes are not being taken into account, if that is the way of how this texture matrix calculus should work Anyway, I am struggling with this and will appreciate any hints or insights Thanks a bunch as always! Cheers, Nick -- trajce nikolov nick
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org