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?
Difference between LightVector and LightDir
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement