undesired one frame delay with multiple jit.gl.texture and jit.gl.slab

Jul 22, 2011 at 11:21pm

undesired one frame delay with multiple jit.gl.texture and jit.gl.slab

Hi everyone,

a bit of a mystifying bug/feature. I really like rendering gl scenes to jit.gl.texture in order to affect it with jit.gl.slab (adding blur/compositing/etc). I want to render the same set of GL objects to multiple textures+slab elements! But when I do, they are not synchronized with one another! Instead, whichever is rendered-to-texture second is one frame delayed. (it works fine when I don’t have any slabs, so it is def a property of slab, not of jit.gl.texture). Please see below patch for demonstration (running on max 5.1.3 on OSX 10.6.8).

Any ideas would be greatly appreciated! I’m moderately experienced hacking the shader language, so if there is a way to tweak it in there, I can do that too…

Thanks, Dan

– Pasted Max Patch, click to expand. –
#58143
Jul 24, 2011 at 9:02pm

i have tried your patch and works fine here,
both circles change in sync with slab process on.
but im in max 5.1.8 and win7..

#208795
Jul 24, 2011 at 10:03pm

I tested your patch on a MacBook Pro (Mac OS X 10.6.8, Max 5.1.8) and confirm the problem. On a Windows 7 64 bit (Max 5.1.8) there was no problem.

#208796
Jul 24, 2011 at 10:11pm

And an off-topic suggestion, not directly related with your problem. By taking a look at your patch, I noticed that instead of doing this:
draw geometry,
capture to texture a
erase
draw the same geometry again
capture to texture b
erase

You could simplify it by not erasing and drawing again:
draw geometry
capture to texture a
capture to texture b
erase

#208797
Jan 8, 2012 at 1:54am

Hey everyone,

Has anyone come up with a solution to this? (especially Dan / woffle6452?)
I have the very same problem with slabs delaying frames… which I have A/B tested and isolated the same way.

Thanks for letting me now!
Thomas

#208798

You must be logged in to reply to this topic.