   Alphablended plane disregards my colourchoice
  I am working on a program where I work around in a 3D space of objects. Now I need to add simple quads that alphablend, that works fine except for one detail. No matter if I chose a blue or white or other mixed D3DCOLOR using the D3DCOLOR_RGBA macro the quad _always_ turns out in some greyish colour. The alphablending I assign it turns out fine, but no matter what values I set for the RGB in the vertices I always get this grey boring colour.I thought it would be some renderstate that is messing things up or some texturestate from earlier but I have not been able to pinpoint where the problem originates from.Here are the render and texturestates that would be active when rendering the quad.m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_MODULATE );m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );m_pD3DDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_TFACTOR );   m_pD3DDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );m_pD3DDevice->SetRenderState( D3DRS_SRCBLEND,   D3DBLEND_SRCALPHA );m_pD3DDevice->SetRenderState( D3DRS_DESTBLEND,  D3DBLEND_INVSRCALPHA );m_pD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE  );m_pD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_TFACTOR );m_pD3DDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_MODULATE );m_pD3DDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_CCW);m_pD3DDevice->SetRenderState(D3DRS_ZENABLE, D3DZB_TRUE);m_pD3DDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID);m_pD3DDevice->SetRenderState(D3DRS_NORMALIZENORMALS, TRUE);m_pD3DDevice->SetRenderState(D3DRS_LIGHTING, TRUE);m_pD3DDevice->SetRenderState(D3DRS_AMBIENT, D3DCOLOR_XRGB(100, 100, 100);Thankful for help on what might be causing the colour problem and how to solve it. 
  1) What value are you feeding into TFACTOR ?, i.e. what value are you setting for the D3DRS_TEXTUREFACTOR render state?. Your TextureStageState setup uses TFACTOR, and the D3DRS_TEXTUREFACTOR renderstate is what you need to change  to alter that.2) Since none of your TextureStageState setup refers to DIFFUSE or SPECULAR, then your D3D lighting setup has no meaning. So your D3DRS_NORMALIZENORMALS, D3DRS_LIGHTING and D3DRS_AMBIENT are doing nothing apart from using performance.3) Where is your alpha value coming from? - your TextureStageState setup specifies that it''s modulated between TFACTOR and the texture. So you need to ensure that both of those have valid alpha.4) Your TextureStageState setup doesn''t refer to DIFFUSE so any colour specified at the vertices won''t have any effect.5) You should set the D3DTSS_COLOROP and D3DTSS_ALPHAOP for stage 1 to DISABLE.  ;  First of all, thank you for the reply. Now down to business.1: Well, I have not put any value so it should be defaulting to opaque white I think.2: Very true, leftover code from an early experiment with lighting. I don''t intend to use this. Thanks for pointing that out. =)3: Not really sure about this one. Since the default TFACTER would be (if I am assuming correctly) opaque white and the quad (which is just a texturelless quad with colouring) has an alphavalue in its D3DCOLOR RGBA I think those are met. Right?4: Yes, I suspected that having DIFFUSE as a colourarg should solve my problem, and tried having both or one of the D3DTSS_COLORARG to this before posting here but the result was still a grey quad or that ir disappeared completely (when both D3DTSS_COLORARG were set to DIFFUSE). I am not overly comprehending this as of yet how all of these can affect eachother as you might notice. 5: Ok, I tried to change these parameters in conjuction with the DIFFUSE, I wasn''t able to achieve my desired result. The quad remained grey or disappeared. Perhaps I did it wrong?  ;  Anyone who can help me with this?  ;  I just wrote some code for an alpha-blended textured quad, and here''s my render states:    m_pd3dDevice->SetRenderState( D3DRS_FOGENABLE,   FALSE );m_pd3dDevice->SetRenderState( D3DRS_ZENABLE, FALSE );m_pd3dDevice->SetRenderState( D3DRS_ALPHABLENDENABLE, TRUE );    m_pd3dDevice->SetRenderState( D3DRS_SRCBLEND,   D3DBLEND_SRCALPHA );    m_pd3dDevice->SetRenderState( D3DRS_DESTBLEND,  D3DBLEND_INVSRCALPHA );m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLOROP,   D3DTOP_MODULATE );    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE );    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAOP,   D3DTOP_MODULATE );    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_DIFFUSE );    m_pd3dDevice->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE );I also found that using state blocks to make sure that I was not getting interference from whatever was being rendered under the quad was helpful.  