| Hi Patrick, I just improved the composition from Miroslaw in pretty much the same way as your solution for the "gaussian" version of the filter looks like. Maybe you can fiddle in there your code and get rid of all your questions ;-) 1) It is, because you don't respect the gl_TextureMatrix of the the src texture. Textures can be flip, but the matrix always put them back correctly. You have to use the gl_TexCoord[0].xy in the fragment shader to get correct xy-coordinates, they are transformed in the Vertex Shader by the texture matrix. 2) the "default" implementation of the GLSL shader puts in a "uniform sampler2D texture;" which is misleading! This means, that the input for the texture has to be a square. so QC is converting your input image to a square texture and feeds this into the GLSL-shader (and manipulates the texture-matrix that way, that the image-aspect ratio is still correct!). Your code ready the native texture size with textureSize2D(src, 0) which is 512x512 I guess in your case. Replace all "sample2D" with "sample2DRect" to get your original texture in the correct size. 3) You have to use a "Render in Image"-Patch to render the GLSL-Shader into a new texture to use it in following patches. Best, Achim |
compound-gaussian 1.qtz
Description: application/quartzcomposer
On 16.08.2010, at 09:27, Patrick Sheffield wrote:
|
_______________________________________________ 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]

