3
votes

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:

  1. Active shadow mapping texture
  2. Active texture 1
  3. Active texture 2

I tried that but it did not work (maybe I've done something wrong).

2
I am new with OpenGL, and I have the same problem as author with the same tutorial. I don't understande everything about what you wrote, and I would like to ask you for help with this issue. Could some one send me a simple source code how to use textures for example for floor in this tutorial. Thanks Regards - user1094785

2 Answers

1
votes

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.

0
votes

yes, for the depth comparison pass, the shadowmap should be bound on a separate texture unit. don't forget to also enable/disable texturing after activating the unit.