Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[Best Tool Asset Store Award] Amplify Shader Editor - Node-based Shader Creation Tool

Discussion in 'Assets and Asset Store' started by Amplify_Ricardo, Sep 13, 2016.

  1. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Also, bug:

    I have a function that has an Additional Directive where it #define's something. If I plug this into my shader graph, my shader has the #define. If I unplug it, and recompile my shader, my shader still has the #define. It wont remove the #define until I close amplify and open it again.

    Edit;

    Done some more digging. It seems to have something to do with the fact that my function node is still in the shader graph. If I unplug the function node, and compile the shader, it still includes the directive. I have to delete the node to get the directive to disappear. But Unplugging it should be enough
     
  2. StrongCube

    StrongCube

    Joined:
    Nov 22, 2016
    Posts:
    50
    Thx. I solved this issue by "Shader.SetGlobalFloat" and "Time.unsacledTime".

    You do not plan to add a component "Unscaled time" ?
     
  3. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    857


    I ended up opting to use "Layered Blend" instead and simply changed my textures to work with that.
     
    Amplify_Borba likes this.
  4. eric_delappe

    eric_delappe

    Joined:
    Dec 10, 2015
    Posts:
    26
    Hi, I'm having some trouble using ASE with HDRP 4.8.0. Unity version 2018.3.6f1

    When I import the HDRP templates, I get the following errors:

    The shaders from the HDRP example package also have some of these 'GetNormalWS' errors, and load as pink. But if I rebuild those shaders in ASE, the errors go away and the materials look normal. I can also create new ASE shaders using the templates, and they seem to look fine, even though the templates themselves still have the errors.

    This was tested on a clean project, only HDRP package and ASE installed.

    I do not experience this issue with HDRP 4.9 or 4.10.
     
  5. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Hi all,

    there's anyone knows how to create this path of exile effect (see gif) in amplify? that cosmic region in atlas of worlds?
     

    Attached Files:

    • poe.gif
      poe.gif
      File size:
      1.8 MB
      Views:
      726
  6. jjobby

    jjobby

    Joined:
    Nov 28, 2009
    Posts:
    160
    Hi, have you found anything? Can we assume that it's a limitation (or a bug) of current HDRP?
     
  7. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, this should be possible to add, I'll register your request for the developer to consider, thank you for your feedback!

    Regarding this issue, I've confirmed it on my end and have escalated it to the developer so that it gets fixed as soon as possible, thank you for reporting it and sharing additional details.


    Hello, unfortunately these errors will always come up in this type of situation since we build our templates for the latest SRP version, however, since we now detect which version is installed, the final shader is now made compatible with it. We fully recommend that you use the latest supported SRP version if possible.


    Hello, this seems to be a dissolve effect achieved through the use of a mask.


    Hey there, according to all the tests that our developer has made it seems that this is indeed a limitation of the HD RP. Even with the Lightmode set to Always, only the first pass is ran, so unfortunately there's nothing that we can do on our side regarding this.
     
  8. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, we currently only offer the Time value as given to us by Unity and have no plans for adding any other type of time node. Users will have to implement their own timer logic for effects where a custom solution might be required.
     
  9. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    thanks, i guess i can start from there!
     
    Amplify_Borba likes this.
  10. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    Amplify_Borba
    i have a problem, how to achieve fade off edge as i kept having the cut off edge?
    poe2.gif
    as seen in:
    poe.gif
     
  11. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    At first glance I would assume they're using a noise mask, it's hard to tell as there could be several ways of achieving such effect. From your screenshot, it seems as if you're using the Opacity Mask port, which only allows values of either 1 or 0, fully opaque or fully transparent.

    Here's a simple example using the Opacity port instead so that there's a falloff in the transparency:



     
    hopeful likes this.
  12. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    505
    I think an Auto-Register option would be best for these situations. Maybe I want to add a function that only holds additional defines to all my shaders...
     
    Prodigga likes this.
  13. GroZZleR

    GroZZleR

    Joined:
    Feb 1, 2015
    Posts:
    3,201
    Having an issue with the Legacy/Particles Alpha Blended template.

    I started a new shader and added a Template Parameter and Texture Sampler node:
    graph.png

    which creates this error:
    error.png

    In the generated shader it's declared twice (no surprise based on the error):
    shader.png

    And the template is declared as such:
    template.png

    I'm guessing I just have to remove the _MainTex_ST declaration in the template as it gets declared when you add the sampler node and this is just an oversight? Or have I done something wrong by adding the Template Parameter node? First time working with the new templates.

    Thanks.
     
  14. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    The fact that all directives set over the shader function are always being used was by design and not a bug itself. Since we are not associating this data to a specific Function Output node we decided that, if the shader function is placed on the shader, then its directives should be always registered.
    To be a bit more specific, this register process happens in the moment you place the shader function over the graph.
    I do however see your point, and really like this suggestion you gave.

    Unfortunately you stumbled over an issue.
    We've just uploaded a new build into our website with a fix not only for this but some other reported problems.

    Here are the release notes.
    Release Notes v1.6.3 rev 04:
    • Fixes:
      • Minor fix on Screen Space Detail sample
      • Fixed issue on instanced surface terrains not being able to be picked/selected
      • Fixed issue with lightmaps and instanced standard surface terrains
      • Fixed issue with 'Four Splats First Pass Terrain' shader function on default templates
      • Fixed issue with duplicate local variables on 'Texture Coordinates'
      • Fixed issue on duplicate ST variable when using Particle Texture Parameter over Particles template
    • Improvements:
      • 'Switch By Pipeline' node now takes default template and surface into account
      • UsePasses can be directly registered by nodes on data collector(API)
      • ASE Custom Shader Inspector now also shows SRP Batcher compatibility status
    Happy shader creations.
     
    BOXOPHOBIC, hopeful and GroZZleR like this.
  15. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    thanks
     
  16. MechaWolf99

    MechaWolf99

    Joined:
    Aug 22, 2017
    Posts:
    293
    Hi,

    I am trying to recreate the toon shader in the HD SRP. I am not sure what to connect it up to. I tried Albedo, but no luck. And the "Light Attenuation" node has a warring on it saying "This node will only produce proper attenuation if the template contains a shadow caster pass". Which I will be honest. I have no idea what I need to add to fix that. If it is even currently doable.

    So, not sure if toon is not currently supported for HDRP, or I just don't know what i am doing. Any insight would be appreciated. :)
     
  17. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Hey guys... it's been a while since I last posted here and I'm loving the new improvements to this tool... I was also able to replicate the skin shader from Marmoset Toolbag 3 (minus the peachfuzz). But has anyone here managed to create proper hair with the correct depth? No matter what my efforts are, I can still see the head mesh through it, although it's full alpha
     
    hopeful likes this.
  18. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Amplify_RnD_Rick Hi how is it going in here, been a while since the last time i checking up this thread. is there a way to see the complete changelog of ASE? i would like to check how far ASE compatibility with HDRP right now.
     
  19. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Unfortunately you currently won't be able to achieve that effect on HDRP. That node along with Indirect Diffuse and Indirect Specular aren't converted yet to HDRP.
    We are still currently figuring out to get that info over the HD pipeline on a proper manner to be used on those nodes.
    We do apologize for the inconvenience.

    Thanks. Glad to have you back!
    On our end, we still hadn't had been able tackle that.

    Also glad to have you back!
    Yes, we keep a complete change log on the ASE package. You can check it on AmplifyShaderEditor>ChangeLog.txt.
     
  20. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Awesome, i'll check it out. Thanks Rick
    @Amplify_RnD_Rick Oh is it support latest HDRP preview? 6.6.0-preview for 2019.2.a
     
  21. petersx

    petersx

    Joined:
    Mar 5, 2015
    Posts:
    239
    Hi,

    Did ASE is working with new PP stack in HDRP ?
     
  22. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, we don't officially support Unity 2019 yet as its still in beta stage, and the latest HDRP version currently supported is 4.10.

    Hello, as announced in this post, we've recently added support for creating Post-Processing shaders for the PPS through a new template that is currently available in the latest ASE builds.
     
  23. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Ah okay, Noted. Thanks
     
  24. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hey guys,

    We've uploaded a new build into our website.

    Here are the release notes
    Release Notes v1.6.3 rev 05:
    • New Sample:
      • SRP HD Omni Decal
    • Fixes:
      • 'Indirect Diffuse Light', 'Indirect Specular Light' and 'Light Attenuation' now works on Lightweight SRP
      • Fixed issue on 'Screen Position' node previewer when on Screen Mode
      • Fixed 'Screen Depth' node issue over Particle Alpha Blended template
    • Improvements:
      • 'Static Switch' nodes now have a Reference mode
        • Can use other nodes as reference, similar to 'Texture Sample' node
      • Minor cleanup on 'Reconstruct World Position From Depth' shader function
      • Can set shader functions as hidden so it wont show on context menu
        • Activate Hidden toggle over shader function General options
    Here's a preview on our new sample SRP HD Omni Decal.

    SRPHDOmniDecal.gif

    This sample is not by any means locked to the HD Pipeline. It can easily be ported to another one, its just a matter of opening the SRP HD Omni Decal shader and select a different output node.

    Happy shader creations!

    EDIT: We noticed a loading issue with the Static Switch node on certain versions right after the upload was done and re-uploaded a new build with a fix. If you have downloaded it when I first created the post, please re-download again.
    We do apologize for the inconvenience.
     
    Last edited: Mar 12, 2019
    BOXOPHOBIC likes this.
  25. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    505
    Hi

    Not ASE related but maybe somebody can help me out.
    I'm trying to change an object scale through a vertex shader.
    The math is super simple, I just need to multiply the vertex pos with a value and use it with the vertex offset port.

    In order to be able to use batching, since vertex position can't be used, I decided to "pack" the vertex position in a tex coordinate in a custom mesh. The problem is that even the vertex position is stored in a tex coord, when batching is used, my custom scale is not working properly.

    I also tried to store the vertex position in vertex color, ch2, ch3, ch4, with batching the scale is not working properly. When I connect any of these mesh channels to the debug port, the information is there (with or without batching), so I assume that it has something to do with how the the model, object to world, object to clip pos matrices... are constructed.

    Any ideas? Thanks.
     
  26. Kriszo91

    Kriszo91

    Joined:
    Mar 26, 2015
    Posts:
    181
    Hello!
    There are any existing documentation about which nodes works as expected in HDRP?
     
  27. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, unfortunately I'm not entirely sure on what to suggest regarding this, hopefully someone from the community will be able to pitch in!


    Hey! Most nodes should work unless otherwise specified in the node page, or if the node itself throws a warning.

    Did you encounter any issue with a particular node?
     
  28. RedEarth

    RedEarth

    Joined:
    Nov 4, 2016
    Posts:
    23
    Hi everyone! Apologies if this is a simple issue and I have missed the answer, I'm very new to writing shaders and amplify.

    I'm trying to set my shader's colour property via script, and it seems to work, however the shader's default colour (white) is displaying in game and in editor. The weird thing is if I click on the colour property in editor, the colour wheel selector displays the accurate colour set through script. I'm stumped.

    Im setting the colour via SetColor() and the data being passed is a Vector4.

    Any thoughts? Thanks!

    Edit: Solved, typical user error :)

    Color uses a value range of 0-1. I was passing in a value range of 0-255.

    So instead of using Vector4 to define colors, I switched to Color32 which converts to Color 0-1 range automatically.
     
    Last edited: Mar 23, 2019
  29. Grhyll

    Grhyll

    Joined:
    Oct 15, 2012
    Posts:
    119
    Hi!

    Switching from Shader Forge to Amplify, so far I love what I see (I do miss the node creation shorcut though)!

    I have two questions, first one is related to this setting:

    Edit: Finally my solution, it was simply an issue with the ZTest mode... not used to tweak it in Shader Forge ^^'

    GrabScreenColor.png

    I'm trying to do a shader with a very custom blend method that I have to write into the shader instead of using one of the preset options. My issue is that if I put 2 objects with that same shader, the first one doesn't seem to be included in the GrabScreenColor when the second one is drawned. They have a different z coordinate, I've also tried to give them non-uniform scales to force disable batching (is there an option for that in the editor btw?).
    I've tried to change every option I could find, but no matter what I do I can't seem to force the GrabScreenColor to include the objects using that same shader (that's what the disabled "Custo Grab Pass" checkbox should do, right?).
    Any lead?

    Second question: Is there a way to enable grid snapping by default, without having to hold a key?
     
    Last edited: Mar 18, 2019
  30. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    857
    OP3NGL, ondrej1981, Squize and 3 others like this.
  31. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    Aww. Thankfully I put my development on standby as I'm updating my pipeline to DX12 and using an AMD Ryzen Threadripper for my unity projects.
     
  32. Caliber-Mengsk

    Caliber-Mengsk

    Joined:
    Mar 24, 2010
    Posts:
    689
    Ok, I've given a due diligence on google searching and haven't found anything so far. I am doing a basic 2d double sided transparent lit shader. Should be pretty simple right? It's working fine as far as rendering things in general, BUT there is z fighting. Things at the same z position are fighting for rendering rights. Is there a way to change the "Queue Index" based on the Renderer/Sprite Renderer's "order in layer" value like the default unity sprite shader? (Completely new to shaders really, so sorry for my ignorance if I am missing something.)

    Also.... O-o is there a way to make a new vector 3 from inputs? I don't see a way to do it with the base vector3 node. (this is not as important as the initial question, but I was going to try to change the local vertex offset's z position based on the x or y position and couldn't find a way to just make a new vector3 where I swap the z value out.)
     
  33. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! Can you share a simple sample through support@amplify.pt so that we can debug it on our side?


    Unfortunately no, but I'll be sure to register your suggestion for the developer to consider!


    Thank you for sharing, we do encourage community submissions such as this one as it wouldn't be possible for us to provide all sorts of nodes or samples due to our limited resources. We've already added several contributions to the main package and are always on the lookout for more!
     
  34. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! Unfortunately I'm not entirely sure on what to suggest, since depth ordering issues are very tricky to deal with, I suggest that you consider changing the material's Render Queue via scripting to accommodate for the behavior you desire, or simply having the objects

    Regarding your second question, you can use the Append node for that purpose:

     
  35. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    505
    Hi. I just saw this:
    • Standard Surface custom ASE shadow caster can now be turned off
    • Toggle on new 'Use Default Shadowcaster' option over Rendering Options group

    What is the difference?
     
  36. FeastSC2

    FeastSC2

    Joined:
    Sep 30, 2016
    Posts:
    978
    I have a few questions:

    - Can a sprite be lit in HDRP?

    - What's the closest thing that remembles the "Custom lighting" node that was on the standard shader for the HDRP Lit master node? Can I modify the lighting with an HDRP shader?
     
    Last edited: Mar 20, 2019
  37. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    158
    Edit: Solved!



    Is it possible to use ASE to modify Unity's Deferred shadows ? (Maybe injecting a custom shader somewhere? i have no idea what i'm talking about here cause i've never done something even remotely similar)


    Also.. dunno if it's a known problem but Light Color node doesn't work in the debug output when you're using anything else than a Directional Light ^^
     
    Last edited: Mar 22, 2019
  38. SpyChar

    SpyChar

    Joined:
    Jul 15, 2012
    Posts:
    11
    From what i've seen You are trying to make hair work with alpha blended transparency. I would say that this is not the way to go as it will always cause some sorting issues. Every triple A game nowadays is using cutout shaders with dithering to soften the edges.
     
    Last edited: Mar 21, 2019
    KRGraphics and hopeful like this.
  39. SpyChar

    SpyChar

    Joined:
    Jul 15, 2012
    Posts:
    11
    I've tested the latest unity 2019.2 and I was almost able to fully shade a human model. The only thing that is missing from shader graph is POM to make the eyes work and it looks like we won't see it anytime soon. Is ASE compatible with 2019? Does it have all the hdrp shading models implemented?

    Also, Unity finally added per pixel depth offset to their shader and I'm extremely happy as this makes hair authoring much easier. Is Amplify going to support it anytime soon?
     
    KRGraphics likes this.
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    I already have POM for my eye shaders :)...and it's BEAUTIFUL
     
  41. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    I can't wait to have this for my hair
     
  42. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    And I haven't yet figured out how to do dithering for my hair. I already have everything else except clean cutouts... I may even up having hair set to 4k
     
  43. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Is it possible to make transparent holes through skinned meshes with this? Like a bullet hole throough a hand?
     
  44. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    857
    your submission form does not work for me on chrome.
     
  45. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    857


    I've adapted dithering for my hair but i'm unsure if the implementation is correct.

    My current implementation looks like this. The B value being set to 10...
     
    KRGraphics and hopeful like this.
  46. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    For dithering to work properly you need Temporal AA
     
  47. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    857
    Yeah i noticed it looks much better in that mode, but I was trying to use Fast XD

    Question, how do I handle transparency with the same shader across multiple objects? Here the head is a separate object.

    Is there documentation for using "additional Use passes"? Or is that not compatible with custom lighting?




    EDIT: in other news i found this quite funny today...



    EDIT2: Ok i kind of solved my problem, but now i have an issue in the game view where the skybox renders weird. (i'm using alpha mask cause i would like the effect to be influenced by lighting and shadows.)

    Editor view


    Game view



    Any ideas?

    It seems to flicker the alpha channel between full black or full white.
     
    Last edited: Mar 23, 2019
  48. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Hi guys,
    I've a question.
    I'm trying to convert a free shader in an ASE shader.
    I can't understand how to setup the ASE shader for some pragma directives the shader have.
    In particular I have this:
    Code (CSharp):
    1. #pragma surface surf Standard finalgbuffer:GBuffer
    And then I have this function
    Code (CSharp):
    1. void Gbuffer (....)
    Where should I set that directive "finalgbuffer:GBuffer" ?
    At the moment I did this

    but I'm not sure that is enough.
    Is it right as I did?

    Thanks in advance
     
  49. HitsuSan

    HitsuSan

    Joined:
    Sep 28, 2014
    Posts:
    158
    I need to turn the node Light Attenuation into a simple Float, any ideas?
     
  50. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,458
    I was about to mention this. I also generated my hair textures with CG hair and baked to a texture. I also don't use cutouts because they look terrible...

    In the Alloy hair shader, it uses multipass rendering which I can't figure out to get it working properly in ASE... pretty much transparency on top of a cutout to give that smooth hair.
     
    Last edited: Mar 23, 2019