efficient slab usage


    Feb 12 2006 | 4:37 pm
    I was just testing a setup with different layers of video each processed by
    a series of slab objects. The slab routing is switched in realtime, so they
    have to be "stand-by". I build groups of slab with a static shader file
    name, but noticed that if they don't do anything, they are still eating my
    cpu. With 8 slabs this is fine, but the difference between 8 and 24 is about
    30%. (pentium m 1.86)
    When I DO put them to use, the increase in cpu usage is a little or a
    lot depending on what they're doing, like I would expect.
    I am wondering if there is a way to efficiently manage large amounts of slab
    fx without draining the cpu. Maybe someone can give a little insight on how
    slab is handled by Jitter? Is it normal to get cpu utilization from inactive
    slab objects? If so, is it possible to dynamically load sfx files without
    getting hick ups? Thanks.
    T_

    • Feb 13 2006 | 9:36 pm
      On Feb 12, 2006, at 8:37 AM, Thijs Koerselman wrote:
      > I was just testing a setup with different layers of video each
      > processed by a series of slab objects. The slab routing is switched
      > in realtime, so they have to be "stand-by". I build groups of slab
      > with a static shader file name, but noticed that if they don't do
      > anything, they are still eating my cpu. With 8 slabs this is fine,
      > but the difference between 8 and 24 is about 30%. (pentium m 1.86)
      I might suggest sending them the message "enable 0" when not in use.
      This might solve your problems.
      > If so, is it possible to dynamically load sfx files without getting
      > hick ups?
      If loading a jxs file gives a hickup (which I believe only happens if
      the native driver doesn't support GLSL, and instead uses the Cg
      Runtime for compiling the shader), the hickup should only happen the
      first time, as we cache the compiled shader code for all subsequent
      uses.
      Another thing which sometimes leads to file related hickups has
      nothing to do with loading/compiling the shader, but rather searching
      through a large search path for the named file. You might want to use
      absolute path rather than just the filename. There should be some
      threads in the archives covering this topic.
      Hope this helps.
      -Joshua
    • Feb 13 2006 | 11:16 pm
      Using @enable in combination with absolute paths will cure the problems. I
      don't think my card (nvidia go6800) supports glsl, as I've noticed a delay
      when first loading a file, but it's cached like you said. Thanks a lot.
      T_