-- -- Color blending (similar to alpha blending - use a color texture for the incomming alpha) -- Pass: 1 -- SetVertexFormat( D3DFVF_XYZRHW + D3DFVF_DIFFUSE + D3DFVF_TEX1, 28 ); SetAlphaBlending( D3DBLENDOP_ADD, D3DBLEND_ZERO, D3DBLEND_INVSRCCOLOR ); SetZWrite( FALSE ); SetCullMode( D3DCULL_NONE ); BeginStage() SetStageAddress( D3DTADDRESS_CLAMP ); SetStageCoordinates( 0 ); SetStageTextureOP( D3DTOP_SELECTARG1, D3DTA_TEXTURE, D3DTA_DIFFUSE, D3DTA_DIFFUSE ); SetStageAlphaOP( D3DTOP_SELECTARG1, D3DTA_TEXTURE, D3DTA_DIFFUSE, D3DTA_DIFFUSE ); EndStage()