hey cyrille, thanks a lot! everything is working now! I also think it is strange that you have to render the last texture (23) before the shader (13). is there any possibility to influence the pix size other than loading images that have the same dimen as the gemframebuffer? marius.
cyrille henry wrote:
marius schebella a écrit :
actually, the 06. patch might be more complex, but it is not doing what I need. I really need two textures, both coming from other framebuffers.
that's what i send you in my last mail.
and all my attempts with dummy images failed. can you have a look at my patch? I hope the zip does not get caught in the spam.
ok you should not send texunit to the texture you're using to texture in a square : the 1st texture (texunit 0) is used for the texturing, so sending texunit 1 will result in corrupted data in texunit 0. so, you have to get the texture Id out of the framebuffer, and send it to an other pix_texture. this 2nd pix_texture can then be used as texunit 1...
rendering order is very important. i don't understand why frambuffer should be render before anything else. this is certainly a small bug.
so, this patch work with image. with video, you'll may have 1 frame delay.
in fact, you're right, it's not trivial, i'll may have to clean this patch and commit it to cvs.
cyrille
thank you! marius.
cyrille henry wrote:
marius schebella a écrit :
cyrille henry wrote:
look at example 06 in 10.glsl gem example folder.
(a patch is better than any explanation...)
this patch still uses one texture that comes directly from an image (gemhead 17...). In my case I wanted to use both inputs from a gemframebuffer.
that's not a problem. just remove the part that load texture 2, and replace it by a copy of the part that use a glsl / framebuffer (changing texunit 3 to texunit 2).
here is the result. (shader are not relevant, but it work here) moreover, this patch is more complex than what you need, as shader output is used for next frame as shader input to create a feedback loop, but it's easy to remove this.
if you still have problem, i certainly have to create a 07 example...
cyrille
marius.
GEM-dev mailing list GEM-dev@iem.at http://lists.puredata.info/listinfo/gem-dev