View Single Post
Old 05-26-2013, 12:32 PM   #49
Justin's Avatar
Join Date: Jan 2005
Location: NYC
Posts: 12,628

Originally Posted by bang View Post
/*** alas, doesn't work:
// a.rgbapush(); b.rgbapush();
function rgbamix2( mix )
  instance( r, g, b, a )
  local(a1, b1)
  mix1= 1-mix;
  b1.rgbapop(); a1.rgbapop();
  r= a1.r * mix1 + b1.r * mix;
  g= a1.g * mix1 + b1.g * mix;
  b= a1.b * mix1 + b1.b * mix;
  a= a1.a * mix1 + b1.a * mix;
); ***/
anyone have anything better than this?
If you changed local(a1,b1) to instance(a1,b1), I believe this might work! local namespace support would be nice, too, but it isn't currently supported.
Justin is offline   Reply With Quote