Move a directional light according to the camera movement

Started by
-1 comments, last by enigmagame 11 years, 5 months ago
Given a light direction, how can I move it according to the camera movement, in a shader?
Think that an artist has setup a scene (e.g., in 3DSMax) with a mesh in center of that and a directional light with a position and a target. From this position and target I've calculated the light direction. Now I want to use the same direction in my lighting equation but, obviously, I want that this light moves correctly with the camera.
Thanks.

This topic is closed to new replies.

Advertisement