• Advertisement
Sign in to follow this  

light type in GLSL

This topic is 3352 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement