According to Pass::setSceneBlending doc :
...The result of the blending operation is: final = (texture * sourceFactor) + (pixel * destFactor)
Currently, we can set 'sourceFactor' and 'destFactor' parts with Pass::setSceneBlending(), but we can't replace '+' part with other operations.
Already Direct3D9 (via D3DRS_BLENDOP render state) and OpenGL (via glBlendEquation from version 1.2) have some additional blend operations like this :
- Direct3D : D3DBLENDOP_ADD, D3DBLENDOP_SUBTRACT, D3DBLENDOP_REVSUBTRACT, D3DBLENDOP_MIN, D3DBLENDOP_MAX
- OpenGL : GL_FUNC_ADD, GL_FUNC_SUBTRACT, GL_FUNC_REVERSE_SUBTRACT, GL_MIN, GL_MAX
And even my motherboard-integrated graphic chip supports them !!
I hope these features are integrated into Ogre soon (I think the implementation is very trivial).
Additional blend operations apart from ADD
-
- Gnoblar
- Posts: 3
- Joined: Mon Dec 08, 2008 4:13 am
- Praetor
- OGRE Retired Team Member
- Posts: 3335
- Joined: Tue Jun 21, 2005 8:26 pm
- Location: Rochester, New York, US
- x 3
- Contact:
Re: Additional blend operations apart from ADD
This feature is currently implemented in 1.7, so you can get it from SVN. In your material scripts you can change the operation using "scene_blend_op [add][subtract][reverse_subtract][min][max]". Merry christmas!
Game Development, Engine Development, Porting
http://www.darkwindmedia.com
http://www.darkwindmedia.com
-
- Gnoblar
- Posts: 3
- Joined: Mon Dec 08, 2008 4:13 am
Re: Additional blend operations apart from ADD
Wow, I didn't know that, Praetor. Thanks for the quick reply. It's really like a Christmas present to me.
I'll check the SVN version right now. Merry Christmas !!

I'll check the SVN version right now. Merry Christmas !!