Skip to main content
gamedev.net
🔒 Locked

Alpha blending

Started by elis-cool Jul 24, 2002 at 12:34 AM 0 replies 350+ views
Original Post
elis-cool
elis-cool
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
[email=esheppard@gmail.com]esheppard@gmail.com[/email]
niyaw
niyaw
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

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.