Search Unity

Shaders for image effects

Discussion in 'Shaders' started by pfernan, Jan 25, 2015.

  1. pfernan

    pfernan

    Joined:
    Jan 13, 2015
    Posts:
    10
    Hello,

    I was using this tool to generate noise from a shader:
    https://www.assetstore.unity3d.com/en/?gclid=CJTN7d2rsMMCFQTLtAodFCEAbw#!/content/3957

    The generated shaders work perfectly when applied on props, but I tried to use it for an image effect, and it is rendered correctly, but the game runs REALLY slow.

    I fail to see the reason, since it was working smoothly on all type of props.

    Is there any extra requirement or limitation for shaders used on Image Effects?



    Thanks,
     
  2. pfernan

    pfernan

    Joined:
    Jan 13, 2015
    Posts:
    10
    Any idea anyone?

    Pretty pleae with a cherry on top.
     
  3. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    I didnt check that package, but if it does what it says; it generates noise value in a vertex/fragment shader to be used in the same shader.
    There is not much use in this except like some choppy waves/blop kind of shaders where you must provide continuous random value.

    I see no reason to use such a noise value in an image effect, but if you have reasons to have some, then you should accept the low frame rates caused by the complex math in there.

    Use a pre rendered noise texture instead?
     
  4. pfernan

    pfernan

    Joined:
    Jan 13, 2015
    Posts:
    10
    What really irks me is that the shaders runs smoothly on any other object, but when applying it to the screen, it gets extremelly slow.

    I was thinking about using a noise texture but I don't know how to make a tileable and looping noise effect, but that would be the optimal idea.
     
  5. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,878
    You can check out various photoshop plugins, or if you want somethin handy, you can check out Libnoise for c++ and/or my unity port TOZ Noise which includes a editor utility to visually create seamless/tileable textures.

    If you search for Simplex Noise on google, you get alot of code too, it is not too hard to generate textures with all these codez.