There is this tutorial about shadow mapping: http://www.paulsprojects.net/tutorials/smt/smt.html
Ok, but I did not realize how to make a scene with multitexture.
If in the third pass of shadow mapping It is need to bind the shadow mapping projected texture to perform depth comparison, HOW can I bind another textures if I need to bind the shadow mapping texture?
Must I set shadow mapping as a separate texture to be bind? Something like this:
I tried that but it did not work (maybe I've done something wrong).
Just to clarify, you have a pre-existing multi-textured scene you want to shadowmap?
If so, activating all your texture units should work (if you have enough, I think the OpenGL 1.4/1.5 spec only calls for a minimum of two; check GL_MAX_TEXTURE_UNITS_ARB via glGetIntegerv()). If you don't have enough texture units you'll have to use multi-pass rendering/blending.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With