Quartz Composer Patch : Soft Rectangular Mask
/* Published by b-l-a-c-k-o-p.com
Copyright (c) 2007-2012

SAMPLE: Qamera3DDiscoDanceFloor.qtzThis Kernel makes a rectangular mask inset input_pixels from the edge of the source image, and attenuated by the input_fade_power.

float radians_from_degrees(const float in_degrees)
const float M_PI = 3.1415926535897932384;
return in_degrees * (M_PI/180.0);

kernel vec4 msBlackSoftBoxMask(sampler input_image, float input_pixels, float input_angle_degrees, float input_fade_power)
vec2 image_size = samplerSize(input_image);
vec2 image_center = image_size*0.5;
vec2 pixel_coord = samplerCoord(input_image);
vec2 pixel_xy = pixel_coord-image_center;
float theta = radians_from_degrees(input_angle_degrees);
float cos_theta = cos(theta);
float sin_theta = sin(theta);
vec2 rotate_x = vec2(cos_theta,-sin_theta);
vec2 rotate_y = vec2(sin_theta,cos_theta);
float xx = dot(rotate_x, pixel_xy);
float yy = dot(rotate_y, pixel_xy);
pixel_coord = image_center + vec2(xx,yy);
float dist_top = abs(pixel_coord.y-0.0);
float dist_left = abs(pixel_coord.x-0.0);
float dist_right = abs(image_size.x-pixel_coord.x);
float dist_bottom = abs(image_size.y-pixel_coord.y);
vec4 pixel = sample(input_image,samplerCoord(input_image));
const float opaque = 1.0;
float alpha = opaque;
const float power = input_fade_power;
float semi_transparent_left = clamp(pow(dist_left/input_pixels,power),0.0,1.0);
alpha = (dist_left<input_pixels) ? min(semi_transparent_left,alpha): alpha;

float semi_transparent_top = clamp(pow(dist_top/input_pixels,power),0.0,1.0);
alpha = (dist_top<input_pixels) ? min(semi_transparent_top,alpha): alpha;

float semi_transparent_right = clamp(pow(dist_right/input_pixels,power),0.0,1.0);
alpha = (dist_right<input_pixels) ? min(semi_transparent_right,alpha) : alpha;

float semi_transparent_bottom = clamp(pow(dist_bottom/input_pixels,power),0.0,1.0);
alpha = (dist_bottom<input_pixels) ? min(semi_transparent_bottom,alpha) : alpha;

pixel.a = alpha;
return pixel;

Labels: ,

By : Ms. Black Soft Rectangular Mask




 B-L-A-C-K-O-P NEWS    
 Mac Apps    
 iOS Apps    
 Free Download    
 B-L-A-C-K-O-P HOME    
 Privacy Policy    
 Terms & Conditions    
 DIY Greenscreen    
 3D Webcam Mac    
 USB 3D webcam    
 CamCamX Blog    
 CatEye Blog    
 DotMatrix Blog    
 GrabberRaster Blog    
 GrabberWindow Blog    
 Qamera Blog    
 Watermarks Blog    
 PDF Watermarking Mac    
 free art software    
 art software free for Mac    
 art software mac    
 PDFBatchBuild Blog    
 PDF Combine Mac    
 CombinePDFs Mac    
 Combine PDF Files    
 Create iTunes Booklet    
 free graphic arts software    
 graphic design software mac    
 free graphic design software    
 Share Your Pictures    
 Washington DC    
 Universal Binary    
 Cocoa Programming    
 Cocoa Software    
 vector art software mac    
 graphic arts software mac    
 Screen Capture    
 Screen Grab Mac    
 iSight download    
 iSight software    
 PhotoBooth download    
 MacBook Camera    
 iMac Camera    
 CamCamX compatibility    
 Fake WebCam Mac    
 VJ Software Mac    
 Video Mixer Mac    
 Live Video Switcher    
 Video Switcher Mac    
 Apple Webcam Effects    
 Webcam Video Effects    
 Free iChat Video Effects    
 Skype Video Effects Mac    
 Video Effects Stickam    
 iSight Virtualizer Mac    
 Webcast Streaming Mac    
 Best Screencast Mac    
 Desktop Streaming Mac    
 Screencast Streaming Mac    
 Broadcast Live Streaming Video Mac    
 QuickTime Broadcaster    
 Quartz Composer    
 Quartz Composer Plugins    
 Quartz Composer Patches    
 Video Effects Ustream    
 Best Polaroid App    
 Polaroid Camera App    
 iPhone Polaroid App    
 Polaroid Camera Emulator    

Copyright © 2005-2015
All Rights Reserved