light type in GLSL

Started by
0 comments, last by JPulham 15 years, 4 months ago
hi 1.how can i detect light type in GLSL ( for example gl_LightSource[0] is directional light or is point light); 2. how can i know wich light source is actived with gl_EnableFunction
Advertisement
for light type look at the position.w value. If it is 0 it is directional, else it has a 3D position not a infinity. look at this post about it (2nd post)
http://www.gamedev.net/community/forums/topic.asp?topic_id=518088
pushpork

This topic is closed to new replies.

Advertisement