fragment_program + multiple pass


I wrote a classic fragment program that does ‘per pixel lighting’ and it works well with 1 lights.

I wants now to have multiple light and I try with multiple pass rendering. So I enable blending with the following lines :

glBlendFunc(GL_ONE, GL_ONE);

I also use the following depth test :


The problem is that I get strange results for the second lights. The light contribution for it seems not smooth.

I can provide more informations if needed.

Thanks for your help.

Can you post a screenshot? Do you use user clip planes?


Sorry for the previous post,

Here is the correct link : screenshot

I use here only 2 spotlights…


What exactly the screenshot represents? Can you post it in jpeg format?