Force 50% alpha blending

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Force 50% alpha blending

      Ok, im working with Direct3D9.

      What would be the easiest way to force a 50% alpha blend on all primitives?

      I've tried this and alot of variations of this:

      Source Code

      1. oIDirect3DDevice9->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_BOTHINVSRCALPHA);
      2. oIDirect3DDevice9->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_BOTHSRCALPHA);
      3. oIDirect3DDevice9->SetRenderState(D3DRS_ALPHABLENDENABLE, true)


      But all of those do not really force a 50% alpha blend, more of each primitive gets its own blend (it usually ends up invisible), as well as smoke and other primitives with transparencies look messed (black boxes around things)


      Anyway, im not really good in D3D9, but I'm learning, so without the confusing mumbo-jumbo please.

      Thanks,
      Matt