Jump to content
  • Advertisement
Sign in to follow this  
sssss

Difference between LightVector and LightDir

This topic is 2862 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

Im trying to understand the Lighting.sample of rendermonkey

They calculate de lightvector, and afterwards they also use a predifined lightdir

shouldnt they be the same?

Share this post


Link to post
Share on other sites
Advertisement
Haven't seen the sample, but usually a 'light direction' vector will be normalized, while I'd expect a 'light vector' to be an unnormalized vector from the light to the point.

Share this post


Link to post
Share on other sites
Sometimes people like to specify the light direction (the direction light rays flow). But for lighting calculations, the vector from the surface towards the light is used (the light vector). Anyway, they could be using this terminology, but I am not sure without seeing the code.

Share this post


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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!