Hi,
I'm having a real problem when using a GLSL shader and feeding a
Sampler2D with animated images.
It works nicely with regular static images, but leads to a QC crash
when connecting a Render to Texture based image, or even when adding
a CIfilter like BoxBlur into the image chain.
Here's the shader code (based from some discussions into this list):
//VS:
uniform sampler2D DisplacementMap;
uniform float blend;
void main(void)
{
vec4 newVertexPos;
vec4 dv;
float df;
vec4 vari = gl_Vertex;
gl_TexCoord[0].xy = gl_MultiTexCoord0.xy;
dv = texture2D(DisplacementMap, gl_MultiTexCoord0.xy);
df = blend*dv.x + blend*dv.y + blend*dv.z;
vari.z += df;
gl_Position = gl_ModelViewProjectionMatrix * vari;
}
//PS:
uniform sampler2D Diffuse;
void main(void)
{
gl_FragColor = texture2D(Diffuse, gl_TexCoord[0].xy);
}
Any help would be really appreciated.
Thanks
Franz / EXYZT
_______________________________________________
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]