Archive 19/01/2023.

Adding a blend mode

ab4daa

I want to add a blend mode equivalent to self.gl.blendFuncSeparate(self.gl.SRC_ALPHA, self.gl.ONE_MINUS_SRC_ALPHA, self.gl.ZERO, self.gl.ONE);

In OGLGraphics.cpp::SetBlendMode() and D3D11Graphics.cpp::PrepareDraw(), it can have custom alpha factor, which is fine.

But can D3D9 do this?
Read a bit M$ doc , still not certain.

Leith

Should not be a problem - blend modes have been with us for a very long time, and not much has changed over the years. I remember using them on DX8, I think you have nothing to worry about.

ab4daa

I mean, I don’t know how to combine those D3D9 blend modes to do said blend mode.
Unlike opengl and D3D11, seems I cannot set independent factor on alpha channel in D3D9?

Thank you.

Leith

I’m sorry, I can’t answer your question directly, as I have little experience in Urho3D render pipeline - I note that blend mode is set in the renderpath per command, as documented (vaguely) in https://urho3d.github.io/documentation/1.6/_render_paths.html

Leith

this part may be useful :