Sign in to follow this  
Pooya65

light type in GLSL

Recommended Posts

Pooya65    127
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
JPulham    120
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this