Inquiry on D3DX Sprites and transparency.

Started by
3 comments, last by Joshua Schpok 23 years, 9 months ago
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
Advertisement
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

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

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
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+
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

This topic is closed to new replies.

Advertisement