Quote:Original post by MrDoomMasterQuote:Original post by Source
Well, take into account that fixed-function (per-vertex) lighting will only work on the vertexes, so scanning a point-light across a long line will have no effect whatsoever on the line centre.
If you set the normals up correctly then there is no real reason why lighting should fail on line primitives. If all of the line point normals are in the opposite direction to your light direction (ie [1,1,1]) then they will always be lit - unless they fall outside of the light's range.
Also remember that [1,1,1] is not actually normalised - so this may give strange results.
To get proper lighting on a line you will probably have to resort to using a fragment shader to achieve simple per-pixel lighting.
Well I have never heard of fragment shaders, so if you could point me to a tutorial or something I would really appreciate it. Thank you very much for your help!
I'm not 100% sure of the details, but "fragment shaders" are OpenGL's equivalent of Direct3D's "Pixel Shaders". Check out Pixel Shader Basics in the documentation if you've not come across them yet [smile]
hth
Jack