Additive Blending - how?
Additive Blending - how?
How does one use additive blending (as opposed to standard alpha blending)? I hear that DirectX calls can be made through the ‘driver’ – but while setting the render state appropriately would work perfectly when drawing additional primitives into the scene, the majority of objects (such as meshes, billboards etc) are rendered with a single call to drawAll(). Can I set a material to use additive blending?
WarZone - A 2D Action Wargame
http://warzone2d.zapto.org
http://warzone2d.zapto.org
Several days and no replies to such a straightforward question?
WarZone - A 2D Action Wargame
http://warzone2d.zapto.org
http://warzone2d.zapto.org
You probably will have to code it via plain DirectX APIs.
For DirectX 9, set the following Render States (with IDirect3DDevice9::SetRenderState):
D3DRS_SRCBLEND=D3DBLEND_ONE
D3DRS_DESTBLEND=D3DBLEND_ONE
D3DRS_ALPHABLENDENABLE=TRUE
Should result in additive Blending.
DX8.1 should be similar. See the DirectX Documentation.
No clue how to do this with OpenGL, can anyone fill in?
For DirectX 9, set the following Render States (with IDirect3DDevice9::SetRenderState):
D3DRS_SRCBLEND=D3DBLEND_ONE
D3DRS_DESTBLEND=D3DBLEND_ONE
D3DRS_ALPHABLENDENABLE=TRUE
Should result in additive Blending.
DX8.1 should be similar. See the DirectX Documentation.
No clue how to do this with OpenGL, can anyone fill in?