I know there are a lot of topics asking about multiple lights, but I just have one simple question that I can't seem to find the answer to.

So in order to support multiple lights, I loop over the lights, and add together the intensities of each light source (and things like color etc..)

Now the only thing I'm having trouble with, is how to handle the dot product. I tried adding the dot products, but that just makes the two light sources sort of merge into each other, and when they are far apart the object is completely dark.

How do I handle the angle/dot product for multiple lights? (I'm not sure if code is needed to answer the question, if so I'll upload my shader code).