Thread: Alpha-Blending Texture - DX9

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    288

    Alpha-Blending Texture - DX9

    Well, im trying to alphablend a texture.. which is attached to this post, basically, what im trying to do is:

    Make the green transparent
    Make the grey translucent
    Make the black opaque

    So far ive managed to make the green transparent and make the grey AND black translucent..

    Heres the code i used to set the texture stages:

    Code:
    g_Device->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
    g_Device->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
    g_Device->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
    Im trying to figure out how to make only the black opaque.. any help would be appreciated

    I also attached a picture of what it currently looks like...
    Last edited by X PaYnE X; 11-16-2004 at 02:56 AM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. d3d9 c++ texture wrapper... again...
    By yaya in forum Game Programming
    Replies: 0
    Last Post: 04-01-2009, 01:08 PM
  2. D3d Texture Wrapper == ARRRGGGGHHH
    By yaya in forum Game Programming
    Replies: 1
    Last Post: 03-25-2009, 06:41 PM
  3. Pong is completed!!!
    By Shamino in forum Game Programming
    Replies: 11
    Last Post: 05-26-2005, 10:50 AM
  4. Alpha blending w/o color loss
    By VirtualAce in forum Game Programming
    Replies: 37
    Last Post: 10-27-2004, 12:58 AM
  5. Alpha blending
    By SMurf in forum Game Programming
    Replies: 3
    Last Post: 08-29-2003, 06:50 PM