Original Post
I'm developing with vs2003 vc7. I use Haaf's Game Engine, which uses DirectX 8.0. The problem: I use a duplicate of a sprite as a sprites shadow. The duplicate is black and transparent. The backround is seen through the shadow a little bit. This is definitely what I want. When two shadows collide, the area of collision, or intersection, gets rendered with a darker color than the rest of the shadow. This isn't very realistic, when there is supposedly only one light source, usually the sun, in my game. That's my problem. The technical stuff: -The color mode is 32-bit ARGB, with the first byte being the alpha channel. -A sprite is rendered as a quad with a texure on it. -A blending color can be set for a vertex for the following operations: Texture's texel colors can be either: added to the vertex color, resulting in texture lightening. The vertex color 0xXX000000 makes no effect. multiplied by the vertex color, resulting in texture darkening. The vertex color 0xXXFFFFFF makes no effect. -Using the alpha channel: The alpha channel represents transparency. The less the value, the more the effect. Zero alpha = invisibility. Alpha blending can be used to blend an object's pixel colors with the pixels already on the screen when rendering. This is used for usual objects rendering. With alpha addition the object's pixel colors are added to the pixels already on the screen when rendering. This is used to create lighting effects. Now, I'm pretty sure somebody here knows about this kind of stuff, right? The problem together with the technical stuff: I'm using color multiplication with black vertex blending color. The result is a totally black character. I'm also using alpha blending so that I can see the background. With this alpha blending, when two shadows collide, they are also blended, so that the resulting color in the collision area, due to the dark color of the shadow, is darker than the original shadow. I think that in the colliding area the colors of the shadows are added togehter, is this correct? Or are they multiplied, I don't know. How does the blending operation work? Questions: Are there solutions to this problem, or is this a permanent issue, when using this kind of "sticked together with a chewing gum" feature? Is this even a real problem or am I just being nitpicky about things or exaggerating?