User Tag List

Results 1 to 3 of 3

Thread: weird shader application i just thought up

  1. #1
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    weird shader application i just thought up

    this would be even more awesome if it was possible to apply multiple shaders to an object (or layer)

    basically, it's a shader that doesn't actually perform any graphical function (so i'm guessing it wouldn't have any or much of a performance impact in that area); instead of that, its sole purpose is to store values... so imagine a shader that (if there aren't limitations on this) can store, for example:

    50 integers and/or
    50 floats and/or
    50 flags and/or
    other things like color selector values

    obviously you could use whatever amounts of the above you needed

    some uses:
    • the value set could be added/removed during runtime (dunno if MMF would like this or not)
    • you could apply this shader to a layer, giving not only the layer but the frame a set of values
    • each object instance can have its own "extended" value set
    • auto-calculate values; plug one number in, automatically get another one out


    it'd be a mess in the object properties (unless you didn't need presets), but during runtime it should work quite well

    EDIT: i put together a ten-value test shader, but for some reason EffectParam isn't working for me. but this DOES work when applied to layers:

    XML file
    FX file
    Example MFA retrieving values from layer 1

    thoughts?

  2. #2
    No Products Registered

    Join Date
    Jul 2006
    Location
    Texas
    Posts
    1,225
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: weird shader application i just thought up

    I thought it cleared out the values created in the shader after every pixel it loops through...

  3. #3
    No Products Registered

    Join Date
    Aug 2006
    Posts
    984
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: weird shader application i just thought up

    Quote Originally Posted by LazyCoder
    I thought it cleared out the values created in the shader after every pixel it loops through...
    i dunno, it should work, because EffectParam would be kinda useless otherwise

    ... however, EffectParam keeps returning 0 for ANY shader's parameters i try, which is kinda weird (yes i am changing the variable it's trying to read)

    EDIT: i applied a test shader and it works for layers... wonder what's up with EffectParam

Similar Threads

  1. Sub Application behaving weird
    By MikeB in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 6th November 2008, 12:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •