magneto Posted September 22, 2012 Share Posted September 22, 2012 Hi, While looking at some of the built-in VOPs, I noticed some of their inner code has code like this: #if !strcmp($signature, "v4") float $cr = vop_bias($val.x, $amount.x); float $cg = vop_bias($val.y, $amount.y); float $cb = vop_bias($val.z, $amount.z); float $ca = vop_bias($val.w, $amount.w); $bias = set($cr, $cg, $cb, $ca);[/CODE]while others have:[CODE]float $tt, $dbias;$dbias = vop_FilterWidth($bias);$tt = FILTERSTEP($thresh12, $bias - $dbias - $blur12, $bias + $dbias + $blur12, $filter);$tt += FILTERSTEP($thresh23, $bias - $dbias - $blur23, $bias + $dbias + $blur23, $filter);if ($tt > 1) $blend = lerp($region2, $region3, $tt-1);else $blend = lerp($region1, $region2, $tt);[/CODE]Do #if, #else instead of if, else allow conditional compilation?Is it possible to have a VEX function that won't be called if a particular argument has a certain value?Thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.