[PD] RE : Re: need help with gem and glsl feedback
jack at rybn.org
Thu Oct 3 10:21:47 CEST 2013
Use, format RGB32 instead of RGB for your framebufers.
JackPy Fave <pyfave at gmail.com> a écrit :first thanks both for your help.
i was tired yesterday evening.
jack , i have a problem with your patch.
i had already similar problems before, that's why i wanted to use some
shader in the feedback chain .
it works ok BUT with very long feedback ( 0.999 alpha ) values i get a
the point never diseappears( because perhaps of a bad approximation in
opengl ) .
ie : color 1 1 1 0.995
is that a problem with my graphics card ? i don't think so .
i join a clumsy correction test , with makes things flicker a bit too much .
do you have a better workaround?
2013/10/2 Jack <jack at rybn.org>:
> Le 02/10/2013 20:10, Py Fave a écrit :
>> Hello list ,
>> i'm currently trying to understand a bit more glsl ,
>> and am tearing my hairs
>> i have a scene with some moving geometry (torus)
>> on this geometry i use successfully a simple shader to plot a moving circle.
>> i try to make the classical feedback effect , but i need to use glsl
>> because i want to control precisely the adding of the image at time
>> and at time+1
>> here is the feedback shader i try to use .
>> uniform sampler2D tex1,tex2;
>> uniform float motionblurstrenght;
>> vec2 coord = gl_TexCoord.st;
>> void main()
>> vec4 t1 = texture(tex1, coord);//new frame
>> vec4 t2 = texture(tex2, coord);//acumulated frame
>> gl_FragColor = vec4(t1.r);
>> float r = ((1.-motionblurstrenght)*t2.r) + (t1.r);//motion blur
>> gl_FragColor = vec4(r);
>> do you have a clean example or hints on how to implement this ?
>> i am currently fighting with gemframebuffer and pix_texture
>> and rendering order and texunits .
>> and i feel i'm missing something ..
>> i would like , if possible to keep this as an effect i can turn on and
>> off , without modifing my current gem chains .
>> i think i need two gem chains ,one early and one at last in the frame
>> drawing chronology , but i can't make it though i tried a lot
>> any help appreciated .
>> Pd-list at iem.at mailing list
>> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
> This example could help, see attached.
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list