Hi Patrick, the core image pipeline (how I understand it) combines multiple shaders into one until it can't merge them automatically, Then the pipeline will be broken up into several single render steps. Each render step needs to read pixels from textures and write pixels into texture buffers which costs the most time of the GPU cycles. Since you don't know how those core image filters gets stack together sometimes it is much faster to implement the task in a single shader by yourself. In this example I only read two pixels (mask texture and text texture) and write one pixel out to the destination. The pixel value calculation isn't the heavy part, its the reading and writing pixels.
Actually this is also important to keep in mind when looking at compositions with bad render speed performance: Check if you render pixels multiple times in one render cycle and try to avoid it. E.g. you are rendering five times the complete composition view with Billboards but each of the billboards only renders a portion of the screen and has lots of transparent pixels. Try to reduce the useless rendering of transparent pixels by shrinking each Billboard size and you will speed up your composition! best, Achim Breidenbach Boinx Software On 25.04.2012, at 07:58, Patrick Sheffield wrote: > Can I ask why this is faster than an equivalent Core Image node? > > Patrick > > On Apr 21, 2012, at 10:55 PM, Achim Breidenbach wrote: > >> Hi Alastair, >> >> I definitely would go with a GLS Shader patch if you can't get the >> performance with the regular patches. find attached a sample composition. >> >> best, >> >> Achim Breidenbach >> Boinx Software >> >> <scrollingTextWithMask.qtz> >> >> >> On 20.04.2012, at 08:19, Alastair Leith wrote: >> >>> Hi List >>> >>> I'm trying to make an image mask for a billboard such that the masked area >>> stays static while the image of some text moves up and down (as if) inside >>> the bounds of a masked window. The problem I am having is that there is no >>> simple way to give an absolute position for the mask while moving the image >>> independently, like you say a mask in PS or AE behaves. Typically the >>> billboard patch scales a rendering-destination-dimension sized mask image >>> down to be relative to the size of the input image rather than use it as a >>> mask the size of the rendering destination (Problem 1). >>> >>> If I use an Image Transform Patch to translate the text image up/down on >>> the Y-Axis the Billboard patch basically ignores the change in bounds and >>> just centres the image at the same origin as determined by X pos, Y pos and >>> image size (Problem 2). >>> >>> I did make a successful composition that creates a mask the same size as >>> source image (an Image from String patch output) by 'screen' blending black >>> and white cropped images (doing math for the crop inputs to get positioning >>> relative white/black correct) then using a Mask to Alpha patch and >>> inputting it to the Billboard. By animating several of the cropping offsets >>> and heights and the Y-Position of the Billboard I can generate the desired >>> animation of text scrolling up and down inside window bounds. Problem with >>> this solution is it seems overly complicated, a little CPU hungry on my old >>> mac anyhow, and because the crop patch uses integer inputs, an animation >>> that only moves the mask say 33 pixels is noticeably jerky (only just) as >>> compared to just animating Y Postition of a billboard with cropping sprites >>> all around it. >>> >>> Maybe animating a billboard with cropping sprites set to alpha-0%-black >>> (blend mode: replace) on higher layers inside a RII patch is the way to go >>> but I'd like to avoid RII patch on principle that's more overhead. I don't >>> mind using RII patch to construct the mask if it is static and wont keep >>> re-evaluating but that gets me back to Problem 1. >>> >>> Any assists/demos/thoughts gratefully received. I'm sure some of you have >>> been here before — I know I have :-) >>> >>> Alastair Leith >>> >>> The machine does not isolate man from the great problems of nature but >>> plunges him more deeply into them. >>> Antoine de Saint-Exupery >>> >>> _______________________________________________ >>> Do not post admin requests to the list. They will be ignored. >>> Quartzcomposer-dev mailing list ([email protected]) >>> Help/Unsubscribe/Update your Subscription: >>> https://lists.apple.com/mailman/options/quartzcomposer-dev/achim%40boinx.com >>> >>> This email sent to [email protected] >> >> _______________________________________________ >> Do not post admin requests to the list. They will be ignored. >> Quartzcomposer-dev mailing list ([email protected]) >> Help/Unsubscribe/Update your Subscription: >> https://lists.apple.com/mailman/options/quartzcomposer-dev/psheffield%40earthlink.net >> >> This email sent to [email protected] >
_______________________________________________ Do not post admin requests to the list. They will be ignored. Quartzcomposer-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

