PDA

View Full Version : spotlight direction flips



ste3e
08-02-2011, 04:10 PM
http://www.sjonesart.com/images/problem.jpg

Is this a common oddity? The spotlight switches from highlighting the right side of the grout until it reaches the point where the spotdirection vector hits the floor, and then changes to highlight the left side. Oddly, it only does this along the x axis not the z (the floor is a simple quad). Furthermore, it does not do it if I use the spotDirection instead of the light vector (lpos-vpos) to calculate ndotl. Please help, I have very little hair already.

BionicBytes
08-09-2011, 05:00 AM
Can't help unless you post some relevant code - perhaps you are using a shader (so supply the shaders), if not and you are using fixed function then supply the light setup and drawing code.
Perhaps then people may be willing to help.