Archived

This topic is now archived and is closed to further replies.

Joshua Schpok

Inquiry on D3DX Sprites and transparency.

Recommended Posts

Goodness, I love the D3DX Sprite thing, except, perhaps, the bit with requiring textures. It is to my understanding that textures cannot colorkey out certain colors by nature? This is not so great if you genuinely plan on using D3DXSprites seriously. Am I heading the wrong way? Thanks. Oddball Software
http://zap.to/oddball

Share this post


Link to post
Share on other sites
There has been a lot of questions concerning colorkeying and textures. Although I haven''t had the time to confirm this it seems that there are a lot of cards that don''t support color keying in their 3D rendering pipeline. But this isn''t a very big problem as using alpha blending gives a much better result anyway. So what you want to do is to create an alpha channel for your textures that masks the area that is supposed to be transparent.

- WitchLord

Share this post


Link to post
Share on other sites
quote:
Original post by Joshua Schpok

It turns out you can do color keying. After specifiying DDcolorKey as you normally would, just enable Direct3DDevice->SetRenderState(D3DRENDERSTATE_COLORKEYENABLE, TRUE);


Oddball Software
http://zap.to/oddball


I wouldn''t do that if i were you, it can cause a border around the sprite with the color of the colorkey.

+AA_970+

Share this post


Link to post
Share on other sites
I think that border issue may be a driver prob.. (Seems to me that when I still had my riva128, I got green squares around all the tiles in ff7 after upgrading to dx6, but when I got my tnt2, poof, gone....

-Zims

Share this post


Link to post
Share on other sites