Hello Rua,find attached a QC file which uses a GLSL shader to distort an image with its vertex shader. Inside there is a GLSL Grid because a single sprite gets drawn by two triangles which don't give the correct distortion in the middle of the image. You can define four points (0...3) where to draw the image, they go clockwise. Also note that you have to connect the image dimensions to the GLSL shader (I didn't figure out how to do this within the shader itself).
To draw a triangle simply put the same x/y coordinates in the point 0 and point 1.
I hope this helps. Achim Breidenbach Boinx Software
Image Distortion.qtz
Description: application/quartzcomposer
On 29.04.2010, at 04:59, Rua Haszard Morris wrote:
How can I draw an arbitrary triangle or quadrilateral in Quartz Composer?I'm hoping this is a dumb question and there's an easy way to do this.My animation is in 2D and made up of a few triangles/quadrialterals whose corner points move around each frame.I've figured a few weird ways to do this, stretching images with transparent areas via billboards, but this seems a bad idea and would get very complicated very fast.How would I do this? thanks Rua HM -- http://cartoonbeats.com http://haszaristwocents.blogspot.com http://myspace.com/haszari http://last.fm/music/Haszari _______________________________________________ Do not post admin requests to the list. They will be ignored.Quartzcomposer-dev mailing list ([email protected] )Help/Unsubscribe/Update your Subscription: http://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: http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com This email sent to [email protected]

