Hello,
I am facing some issues with rendering multiple shadow maps.
All the shadow maps are rendered in two passes (one from light view and another one for both lit and shaded threw shaders).
Each shadow pass is rendered fine separately for each light. The problem arises when I have more than one light.
I can't use blending in adding mode (GL_ONE, GL_ONE). Since fragments are added, if the pass for the first light makes a lit fragment, it simply can't be darker in the other pass, this turns out.
So, I thought about using blending with multiplying colors (GL_DST_COLOR, GL_SRC_COLOR). But this didn't solve the problem either (maybe because this blending mode makes the resulted fragment to be 2*src*dst... so is twice litted).
I know there are deffered rendering methods, but for now I'd like to stay with multi-pass forward rendering.
Any hints ?
Thanks in advance.



