• Create Account

### #ActualShenjoku

Posted 21 June 2012 - 03:21 PM

Currently they are being set to:

device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);


Maybe there's something wrong with the mask I'm using? Here are the images I'm testing with:

The main image to apply the mask to.
[attachment=9596:test.png]

The image mask to apply. It has a green color just to make it more obvious if there was a problem with the color part. The empty areas have zero alpha, which needs to be applied to the first image somehow.

This is what the result should be.
[attachment=9598:testResult.png]

### #2Shenjoku

Posted 21 June 2012 - 03:17 PM

Currently they are being set to:

device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
device->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
device->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);


Maybe there's something wrong with the mask I'm using? Here are the images I'm testing with:

The main image to apply the mask to.
[attachment=9596:test.png]

The image mask to apply. It has a green color just to make it more obvious if there was a problem with the color part. The empty areas have zero alpha, which needs to be applied to the first image somehow.
device->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);