Closed pjsmith97 closed 4 years ago
Are you taking into account both light sources?
max_t
, along with the direction vector can be used to determine the distance from the point to a light source. You'll find it useful in shadow computations. I don't think that's your issue here.
I do iterate over all the lights (And have point and directional covered). I noticed that in the first instance of finding n dot l (this is the directional light) it's a negative value. I can't tell if it's on the sphere in this instance, but is it possible I'm having sign issues?
Figured it out. I misunderstood d from directional light. Didn't realize it was the direction from the light, not the scene.
Hey, still working on the assignment due to circumstances.
Exactly what is the purpose of max_t? It might have something to do with the problem I'm having, where part of the sphere isn't getting anything but ambient light.
Here is the diffuse image with just ambient light.
I do want to stress that I understand what max_t is, but I don't understand what we do with it.