tamashii 发表于 2010-9-27 23:27:50

D3DXSprite 如何弄合成方式?

RT,就好像是RGSS里面的BlendType一样,加法、减法什么的…………

tamashii 发表于 2015-1-21 15:54:18

虽然是挖坟,但是我自己解决了这个问题。
通过修改 ID3DDevice9 的 RenderState 来做到加减法混合。
加法:
m_lpD3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD);
m_lpD3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
m_lpD3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);

减法:
m_lpD3DDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_REVSUBTRACT);
m_lpD3DDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ONE);
m_lpD3DDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);
页: [1]
查看完整版本: D3DXSprite 如何弄合成方式?