Changing slabs


    Jul 11 2006 | 8:09 pm
    I am trying to seemlessly switch between slabs somehow, but unfortunately having little success right now. Changing the shader by sending a read command creates a pause and makes no sense since I want shaders choosen and compiled before hand. I have realized that just creating slabs will slow down the system whether or not information is sent to them so arraying them in a poly~ does not work out well. I have tried using one slab and then sending individual shaders to it. However each time the slab encounters a new shader there is a pause while I guess it compiles the shader?! After the first encounter the slab will immediately load up a shader if it is sent to it consequent times. How can I get this wrking properly?
    I guess I could make my own slab building a plane myself and using ortho 2 and capture or something like that (do not have access to the docs right now) to render the results by texture but that really would feel redundant. Does anyone have any suggestions how I solve my woes?
    Thanks!
    PS. Using Jitter 1.5 on a windows laptop with a radeon 9700 mobile.

    • Jul 11 2006 | 8:21 pm
      On Jul 11, 2006, at 1:09 PM, Sebastian wrote:
      >
      > I am trying to seemlessly switch between slabs somehow, but
      > unfortunately having little success right now. Changing the shader
      > by sending a read command creates a pause and makes no sense since
      > I want shaders choosen and compiled before hand. I have realized
      > that just creating slabs will slow down the system whether or not
      > information is sent to them so arraying them in a poly~ does not
      > work out well. I have tried using one slab and then sending
      > individual shaders to it. However each time the slab encounters a
      > new shader there is a pause while I guess it compiles the shader?!
      > After the first encounter the slab will immediately load up a
      > shader if it is sent to it consequent times. How can I get this
      > wrking properly?
      This should only be expensive on cards/OS which needs to use Cg to
      compile the GLSL. As of 10.4.3 or later or on PC where supported the
      driver is used to compile the GLSL and is much faster. If you're
      still using the former however, I would recommend just loading all
      shaders you want into slab at patch launch (a slab has to be run once
      for the shader to actually compile). Once compiled, they are cached
      for future use.
      In Jitter 1.6, and the forthcoming CFM 1.5.3, jit.gl.slabs which are
      not in use no longer pose a performance penalty.
      Lastly, by using explicit full paths for shaders (or any files for
      that matter), you can avoid any search path related pauses, which
      might also be part of your problem.
      -Joshua
    • Jul 11 2006 | 8:31 pm
      Thanks for the fast reply!
      I guess I could cope with limiting myself to a choice of 16 shaders in one part of my patch choosen on start. I do not really need to load them in while everything is running. However, do you know how soon it will be until Jitter 1.6 is released for Windows. I already see the betas up for Mac. And sorry, what exactly is CFM? I am very new to Max in general...
    • Jul 11 2006 | 8:57 pm
      On Jul 11, 2006, at 1:31 PM, Sebastian wrote:
      > However, do you know how soon it will be until Jitter 1.6 is
      > released for Windows. I already see the betas up for Mac.
      Mac Universal Binary is our first priority for Jitter 1.6 since this
      update is required for MacTel users to run Max and Jitter natively,
      after we sort out the Mac UB version, we'll be getting the Windows
      Jitter 1.6 and MaxMSP 4.6 versions ready. So sometime later this summer.
      > And sorry, what exactly is CFM? I am very new to Max in general...
      MaxMSP 4.5.7, Jitter 1.5.x and earlier use the older Macintosh CFM/
      PEF executable format.
      -Joshua
    • Jul 12 2006 | 3:15 pm
      Thanks for the information on the upcoming releases!
      Anyway, I switched method. I have the one slab and a poly~ of shaders, all differently named. I switch between shaders by sending the slab a message 'shader '. This works as it should but with one flaw... the slab then only outputs to an area half the width and height in the top left corner. When I send the slab a message to remove the shader used, then the slab renders to the correct area. This should not be a problem with my shaders because they work correctly if read directly into the slab. Am I going wrong somewhere?
    • Jul 28 2006 | 6:51 pm
      Here is an example of this...
      max v2;
    • Jul 28 2006 | 9:06 pm
      On Jul 28, 2006, at 11:51 AM, Sebastian wrote:
      >
      > Here is an example of this...When I choose a shader the slab just
      > renders to a rectangle in the top-left part of the window;
      > When there is no shader , the slab outputs to the correct dimensions;
      This seems to work fine in 1.6b5 UB. Will verify that this is broken
      under 1.5.2 XP and working for the forthcoming version of 1.6 XP.
      Sorry for the nuisance. WIll let you know what we find.
      -Joshua