• Advertisement

Archived

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

Alpha Blending

This topic is 5991 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

Advertisement
This will produce "normal" alpha blending. For example, render a quad with a texture that has an alpha channel with a gradient from 0 - 255. You should see the transparency change with the gradient.


g_pD3DDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
g_pD3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
g_pD3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);

Share this post


Link to post
Share on other sites
Thanks, thats what I needed. I forgot taht DH had a tut on alphableding even though i look at the site about once every 2 days.

Eric Wright o0Programmer0o

AcidRain Productions

Edited by - KingsRevenge on September 26, 2001 9:28:09 AM

Share this post


Link to post
Share on other sites
quote:
Original post by KingsRevenge
Thanks, thats what I needed. I forgot taht DH had a tut on alphableding even though i look at the site about once every 2 days.


G''day!

That reminds me, I really have to get something new up there. Work has been evil lately, earlier in the week I had a 22 hour shift and I''m still recovering.

I haven''t even checked my email in days. Maybe I throw together a quick mini-tutorial on something this weekend (if I''m not working).


Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
hehe cools, I figured out how to do alpha transparency and I got it workin, you can see the screenshots of my progression:

www.infantrydb.com/kingsrevenge/images/devdesktopnum3.jpg
www.infantrydb.com/kingsrevenge/images/devdesktopnum4.jpg
www.infantrydb.com/kingsrevenge/images/devdesktopnum5.jpg

Eric Wright o0Programmer0o

AcidRain Productions

Share this post


Link to post
Share on other sites

  • Advertisement