Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

shadow mapping multitexture

Tags:

opengl

shadows

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).


1 Answers

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.

like image 159
genpfault Avatar answered Sep 22 '26 23:09

genpfault



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!