// Special thanks to Daniel R for the rotation equations! // http://life.neophi.com/danielr/2009/07/pixel_bender_image_rotation.html // Feel free to use and have lots of fun! As with any effect, this looks best in a stack with other filters. It's just one brick // in the wall, so get creative.. // Acid Blend is a custom filter that takes the alpha channel of stencil image (src2), inverts it, and applies it to the alpha channel // of a Base Image (src), but only if it can subtract from it in some way. // It's just a reverse mask. VERY simple. But lots of fun when you get creative with the stencils and their positioning/rotation. // Email me if you'd like help making stencils or using this plugin. kernel AcidBlend < namespace : "com.numeda.display.filters.pbj.AcidBlend"; vendor : "Numeda / Jonathan Hart / synja.com / jonathan.hart@gmail.com"; version : 1; description : "Reverse Masking Blend (acid .. you know, the kind that burns holes)"; > { parameter float2 maskOffset < minValue: float2(-500.0, -500.0); maxValue: float2(500.0,500.0); defaultValue: float2(0.0,0.0); >; parameter float maskRotation < minValue: float(0.0); maxValue: float(360.0); defaultValue: float(0.0); >; input image4 src; input image4 src2; output pixel4 dst; void evaluatePixel() { float2 dstCoord = outCoord(); dst = sampleNearest(src,dstCoord); float angle = radians(maskRotation); float cosAngle = cos(angle); float sinAngle = sin(angle); float2 dropCoord = float2((dstCoord.x - maskOffset.x) * cosAngle + (dstCoord.y - maskOffset.y) * sinAngle + maskOffset.x,(dstCoord.y - maskOffset.y) * cosAngle + (maskOffset.x - dstCoord.x) * sinAngle + maskOffset.y); pixel4 acidDrop = sampleNearest(src2,dropCoord); float reverseAlpha = 1.0-acidDrop.a; if(reverseAlpha