Light source equals the place that we see

Hi,
I was trying to play with the light source of my OpenGL project in order to make a DIFFUSE REFLECTION light that its light source would be from the place that we are currently looking at on the screen…
if anyone could help me do so or point me to a good tutorial i will be very thankful

Thanks a lot :slight_smile:

How are you planning to implement lighting in your program? Using the fixed openGL pipeline or shaders?

It is two different ways of doing the same thing but the fixed pipeline has been deprecated some time now.

If you are interested in the fixed pipeline the 6th Chapter of the Red Book will be sufficient for you. But bear in mind that all this has been deprecated and it is a VERY old way of doing things.

To see some good tutorial on GLSL shaders which will accomplish that effect I recommend the Lighthouse GLSL lighting tutorials .

Hope that helps