Jump to content
  • Advertisement


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



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

I was wondering if there was some sort of special alpha blending states I have to set in order to be able to control the transparency with materials. I was able to control the alpha using vertex color but if never seems to work with materials. Im using these basic alpha blending settings. Device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE); Device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA); Device->SetRenderStat(D3DRS_DESTBLEND,D3DBLEND_INVSRCALPHA); thanx for anything. gamedev.net rocks..as well as d3d.

Share this post

Link to post
Share on other sites
I believe you also have to use SetTextureStageState() to specify the alpha operation for stage 0. Try this...


This basically tells D3D to select the alpha value from the first argument, which you set as the diffuse color.

If it still doesnt want to read the color/alpha from the material instead of the vertex, you may have to use SetRenderState() to set the D3DRS_DIFFUSEMATERIALSOURCE or D3DRS_COLORVERTEX values. Look into them in the docs.


Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!