Search Unity

Creating an Image Effect with Amplify Shader

Discussion in 'Image Effects' started by csofranz, Jun 26, 2017.

Thread Status:
Not open for further replies.
  1. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    I don't know if this is the correct forum to post, but I prefer Unity to the rather, ummm, spartan Amplify forum, and I can't be the only one trying this.

    Anyway, I'm trying to build a shader with Amplify Shader that I can use as a camera effect. I know it's possible, because the FourHeadedCat has posted a video (without any comment) of such an effect working. I've written my basic C# script to call the shader (using Blit(source, dest, material)) - and here's the problem: I have no clue whatsoever how to interface _MainTex in Amplify Shader. The joke they call documentation at Amplify isn't forthcoming, and I'm quite sure that I'm missing a minor detail.

    But for the life of me, I can't figure out how to re-create a shader that I've already written in cg in ASE. Is there anyone who has done this who can tell me how I map reference the source pixels (without resorting to ScreenGrab)?

    Thanks,
    -ch
     
  2. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    (Unless, of course, the answer is: ASE doesn't support Image Effect Shaders, only Surface Shaders)
     
  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    As you may have seen in our Asset Store review reply, we currently don't offer specific tools for creating image effects; it will be available soon. Until then, I recommend contacting @fourheadedcat directly, he is very responsive.

    Apologies for the inconvenience, the documentation wiki pages will be replaced soon with proper documentation.

    Be sure to post on the ASE thread, the community is very helpful. https://forum.unity3d.com/threads/amplify-shader-editor-node-based-shader-creation-tool.430959/

    Thanks!
     
    Last edited: Jul 1, 2017
    UnityLighting likes this.
  4. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Thank you so much for the reply, Ricardo. I'm quite sure I know how Fourheadedcat is doing it - I can almost get it to work using screen grab. The problem with that is that the resulting code is horrendously inefficient, which is a no-go for a screen renderer that processes one or two orders of magnitude more pixels compared to a surface shader.

    I'm looking forward to seeing this new feature in ASE

    Cheers,
    -ch
     
  5. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    No problem, happy to elaborate. I will keep you posted on any related developments, it should be possible to create image effects fairly soon.

    Thank you for your patience.
     
  6. bloodthirst69

    bloodthirst69

    Joined:
    Oct 1, 2017
    Posts:
    28
    Hey , this might be a little late but maybe someone will need this is the future , its not the documentations fault in this particular case , simply add a Texture Sample node in ASE and call it _MainTex (that represents the default camera output : source , this is noted in the Graphics.Blit Unity documentation ), do whatever u want to it then plug it all to the Emission and BAM you got an image effect shader in ASE , literally took me 10 mins to try this ! hope this helps someone
     

    Attached Files:

    tangell, mkandersson and Kevin-VFX like this.
Thread Status:
Not open for further replies.