Quote:Original post by ShaelQuote:Original post by simotix
Maybe I am not explaining it correctly, but I do not understand what is going on here
*** Source Snippet Removed ***
That is my main concern, understanding that code. I do not understand why those values were chosen, what they are doing there and how they can be defined. That is what I am looking to be answered.
Those values are simply the position of the "light" that is projecting the texture. Try to think of projective texturing as if it were a film projector projecting a film onto a canvas. You need to specify the position of this projector, the direction it will project images, and its field of view.
Theres no reason why you can't change those values (60,90,0), they simply define the projector to be 60 units to the right and 90 units up from the origin, and the origin is the position the projector is facing to place the projected image.
One thing to note, make sure "objectTransform" is the identity matrix.
I did make the light values to (0, -2, 0) for it to be above it. But what do you mean make sure objectTransform is the identity matrix? I currently move its position, then rotate it. Is that wrong?