<div dir="ltr">Hi Community,<div><br></div><div>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.</div><div><br></div><div>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:</div><div><br></div><div>osg::Matrixf m = osg::Matrixf::inverse(worldMatrix) * viewMatrix * osg::Matrixf::perspective(120, 1.0, 0.001, 10);</div><div><br></div><div>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</div><div><br></div><div>Anyway, I am struggling with this and will appreciate any hints or insights</div><div><br></div><div>Thanks a bunch as always!</div><div><br></div><div>Cheers,</div><div>Nick<br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">trajce nikolov nick<br></div>
</div></div>