cod5-sdk/deffiles/materials/blendfunc.template
2008-11-20 00:00:00 +00:00

35 lines
901 B
Text

#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