- Edited
Well, not stuck necessarily, but confused:
The video I'm following is this one:
I got confused at the end when he's describing how to make a system to make it so that it darkens the edges where light is not hitting, as opposed to lightening the edges. (starts around 8:50)
In the code he hard codes a light direction in vec3. But, In a typical case isn't the light going to be moving or won't there be different lights from different directions? For example, maybe in a dark cave, the player is holding a lamp and light is emanating from him. So, it doesn't make sense to hard code the light direction.
Is there any other method by which we can perform this task with dynamic lighting?