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


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

Hmmm, didn''t quite know what to call this post... I using D3D for alpha blending in 2D, and I''ve set up my render states like so...
This is fine for alpha blending. But I want to do, I think, ''additive blending'', where if the dest pixel is white, it will stay white no matter what the src pixel is. A kind of ''burned out effect'' some call it. Anyways, this does it...
...but, I''m using a texture with a palette, and the palette has alpha info in it, and I think that''s what messes things up. For example, I have a yellow circle texture, which gradually fades away from the centre, using normal alpha-blending. But it gradually fades to black using the additive blending. I hope somebody knows what the hell I''m talking about Ro_Akira

Share this post

Link to post
Share on other sites
I finally found a past post on additive blending, and it ended with Witchlord giving this solution:




m_pD3DDev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);

m_pD3DDev->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE);

He also mentioned : "Don''t forget to make sure that there is alpha values left after the texture blending stage"

I don''t know exactly what is meant by this(I''m new to D3D), but can only guess that this is what I''m doing wrong, as it''s not working...

The formula d=s+d*a was mentioned during the post.


Share this post

Link to post
Share on other sites