DirectX compliance of the glBlendFunc file (............)

I've created a particle system in OpenGl that works great. When I want to get a burning fire or ray effect or something like that (where the system view "glows" and merges all the colors together), I use this method call with OpenGL.

glBlendFunc(GL_SRC_ALPHA,GL_SRC_ALPHA) 
glBlendFunc(GL_DST_ALPHA,GL_ONE)

      

Now I am trying to do the same using Direct3D

Here's what I've tried:

graphicsDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
graphicsDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
graphicsDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_ONE);

      

but it has absolutely no effect on the look of my game! Does anyone know what the problem might be?

+3


source to share


2 answers


Try:



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

      

0


source


I ended up just switching to OpenGL. But thanks for the help guys: D



0


source







All Articles