bypass and routing around jit.gl.slab (good practices?)

bdonne's icon

hi all -

i am experimenting with multiple jit.gl.slabs and wondering about how to be most efficient in their use. part of me suspects that the most efficient thing would be to go into all of the shader code and add a simple bypass command, since there is no simple enable/disable option to my knowledge.

as it stands now, i'm using a gate and a switch to simply select between things, though i'm not entirely sure of the overall impact on memory and processing here.

any thoughts?

Max Patch
Copy patch and select New From Clipboard in Max.

TFL's icon

If you have Max 8 or below it's a possible way to do this, although I would do it that way instead, using just one gate and @automatic 0 so that the slab uses resources only when it actually receives a bang/texture/matrix (you could also use enable 0/1 instead):

Max Patch
Copy patch and select New From Clipboard in Max.

But in Max 9 you have the bypass attribute which simplifies this a lot:

Max Patch
Copy patch and select New From Clipboard in Max.