Any ideias on how to do this ?
I was thiking in using a cubemap, all faces white, with one single face black, so that everything behind the projector is clipped., but i’m having some problems using a cubemap while multitexture is enabled…
Any other ideias ?
Cubemaps and multitexture should work just fine, but else use a vertexprogram that just flips texturecords from 0 to 1 when the normal faces from the light and use a 1*2 texture with one white and one black pixel.
Originally posted by Bruno: I was thiking in using a cubemap, all faces white, with one single face black, so that everything behind the projector is clipped.
You would need a cubemap which is half black, not 1/6th black. The back half of the side faces has to be black as well.
However, if I were you I would forget about the cube map altogether and go with Mazy’s suggestion of using a 1x2 texture, making sure that everything behind the camera maps to the black texel.
Reflection mapping? and texturecoords enabled?
shouldnt you generate coords from the normals (GL_NORMAL_MAP_ARB i think) and make use of the texturematrix to rotate the cube to the correct angle?