Blending problems / options?

Flambard
03-18-2006, 03:25 PM
Hi there guys!

I'm writing a particle engine for my Direct3d 2d-game, and encountered a serious problem:

It seems, that I can't draw pointSprites AFTER I drew the regular sprites. Is that really so? I tried hardly.

So I decided to draw them manualy, using my sprite engine. Everything works fine, exept the particle blending.

I'm using particle.bmp (found in some1's else project) to draw a particle. As you can see it has some dark borders, which overlapse each other when 2 particles are near (see screenshot for better explanation).

The regular color-keying is working, but it seems, that I need some irregular one? I've tried messing with textureloader filters, but with no luck. What should I do?

RcSepp
08-23-2006, 01:59 AM
With a color key you can just make a pixel visible or not. What I see in your picture is that your green particles have cut of edges (maybe by color key) and a total alpha value for the whole particle.

I would say:
Forget color key and use a .tga image with an alpha channel.
To make this green particle look good do this:
1.Draw the alpha channel (I do this by photoshop) so that the center is totaly visible and the side is totaly invisible like the green color in your particle.
2.Fill the whole image with green so that the gradient is completly made by the alpha channel.

afwasborstel
09-15-2006, 10:12 AM
And how do we load them in a texture?

RcSepp
09-24-2006, 07:31 AM
Tga's are normaly not supported by .net. Use an external library to load them. I always use DevilLib to load tga's. (You should find it in Google)

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum