Archived

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

Alpha blending

This topic is 5625 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you do alpha blending in D3D? TOTWGPG did a pretty good job of explaining all the graphics formats... sooo... well, I only have an 8MB vid card so I am using 565 16 bit at the moment and since it has no alpha channel is there anyway I can get any alpha? eg what is does the color value in the D3D FVF mean? eg it has an alpha channel so is it a 32 bit value? how do I work with this? And I saw D3D also has the 1555 16 bit format, but 1 bit for alpha!?! wont that mean either fully opaque or fully transperent? so its basicly no use whatsoever... am I going to have to use the 32 bit 8888 format? its just that on my crappy card I can hold only a few textures before its forced to swap them on and off the card, thereby halfing my frame rate, so I can get twice as many on using 16 bit... CEO Platoon Studios

Share this post


Link to post
Share on other sites
quote:
Original post by elis-cool
How do you do alpha blending in D3D?


i think all you have to do is get some textures with alpha channels and set up the render and texture stage states.
quote:

TOTWGPG did a pretty good job of explaining all the graphics formats... sooo... well, I only have an 8MB vid card so I am using 565 16 bit at the moment and since it has no alpha channel is there anyway I can get any alpha?


not without the alpha channel, no.
quote:

eg what is does the color value in the D3D FVF mean? eg it has an alpha channel so is it a 32 bit value? how do I work with this?


the DWORD color value has upper 8 bits reserved for the alpha. you can use those bits to provide per-vertex alpha information.
quote:

And I saw D3D also has the 1555 16 bit format, but 1 bit for alpha!?! wont that mean either fully opaque or fully transperent?


this is correct.
quote:

so its basicly no use whatsoever...


you can simulate color keying with 1 bit alpha very easily.
quote:

am I going to have to use the 32 bit 8888 format?


there''s a 4444 format, you may want to use that. CD3DFont uses it for the font textures.

---
Come to #directxdev IRC channel on AfterNET

Share this post


Link to post
Share on other sites