cod5-sdk/deffiles/materials/blendfunc.template

36 lines
901 B
Text
Raw Normal View History

2008-11-20 00:00:00 +00:00
#if "@blendFunc@" == "Add"
blendFunc( Add, One, One );
separateAlphaBlendFunc( Disable, One, Zero );
#elif "@blendFunc@" == "Blend"
blendFunc( Add, SrcAlpha, InvSrcAlpha );
separateAlphaBlendFunc( Disable, One, Zero );
#elif "@blendFunc@" == "Multiply"
blendFunc( Add, Zero, SrcColor );
separateAlphaBlendFunc( Disable, One, Zero );
#elif "@blendFunc@" == "Replace"
blendFunc( Disable, One, Zero );
separateAlphaBlendFunc( Disable, One, Zero );
#elif "@blendFunc@" == "Screen Add"
blendFunc( Add, InvDestColor, One );
separateAlphaBlendFunc( Disable, One, Zero );
#elif "@blendFunc@" == "Custom"
blendFunc( @customBlendOpRgb@, @srcCustomBlendFunc@, @destCustomBlendFunc@ );
separateAlphaBlendFunc( @customBlendOpAlpha@, @srcCustomBlendFuncAlpha@, @destCustomBlendFuncAlpha@ );
#else
#error "unknown blendFunc \"@blendFunc@\""
#endif