Additional blend operations apart from ADD

What it says on the tin: a place to discuss proposed new features.
Post Reply
ddungum
Gnoblar
Posts: 3
Joined: Mon Dec 08, 2008 4:13 am

Additional blend operations apart from ADD

Post by ddungum » Thu Dec 25, 2008 3:43 pm

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).
0 x

User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
Contact:

Re: Additional blend operations apart from ADD

Post by Praetor » Thu Dec 25, 2008 3:56 pm

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!
0 x
Game Development, Engine Development, Porting
http://www.darkwindmedia.com

ddungum
Gnoblar
Posts: 3
Joined: Mon Dec 08, 2008 4:13 am

Re: Additional blend operations apart from ADD

Post by ddungum » Thu Dec 25, 2008 4:31 pm

Wow, I didn't know that, Praetor. Thanks for the quick reply. It's really like a Christmas present to me. :D
I'll check the SVN version right now. Merry Christmas !!
0 x

Post Reply