I would like to render a scene lighted by multiple lights. As the lights number is not pre-defined, I decide to render light by light.
My question is: after I generate serveral RT-Textures contain the result lighted by different lights, how can I combine them to generate the final result?
Some articles show that lights are additive. However, for example, one pixel is shaded color_i
by light_i
on RT-Texture_i
. The final color color_1 + color_2 + ... + color_n
(according to additive property) is more likely to be saturated, I dont't think this is correct (as compared to real world).
EDIT:
The following images are rendered by two light sources, one from front-face and the other from top-face (of the scene).
Front-Face Light:
Top-Face Light:
And the final result (added together):
Here, the shadow on vase is pretty unnatural. Is it caused by the addition of two pictures, and how can I fix it?
PS: this demo is done based on XEffects.