Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    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. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,997
    Awesome sauce. And I still need to figure out how to add passes for my hair shader... (don't know what I'm doing)
     
  2. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    688
    Feature request:
    These double knob sliders in the basic HDRP materials are quite handy. It would be neat if there was a way to express float2s as them in Amplify Shader Editor!

     
  3. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, thank you for the suggestion, I've registered it for the developer to consider!
     
  4. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    83

    In the above image, the yellow block (an alpha faded door) is cutting out the dark red wall (which can also be transparent, but currently has alpha at 100%) Any way to prevent this?
     
  5. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    156
    hi ASE devs,
    another question for you.
    I'd like to create a shader to use with GPU instancing.
    Considering that I'd like to change the UV of every instanced mesh and considering that this change should breaks the instacing, I've read that with MaterialPropertyBlock I can manage the per-instance properties changes.
    My question is: is there a way to define a property as "MaterialPropertyBlock" ?

    Thanks in advance
     
  6. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    688
    Thanks!

    I noticed this issue just now.

    When using Subsurface Scattering in Material Type, it seems like albedo is ignored:





    As you can see in the graph, I'm inputting white, yet the material is black!

    This is in Unity 2018.2.14 using HDRP 3.0.0 and Amplify Shader Editor v1.5.8 rev 00.
     
    Last edited: Nov 8, 2018
  7. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, I'm not entirely sure without examining a sample, however, this sort of depth issue can usually be resolved by tweaking the Render Queue value and / or the Depth settings for both materials.


    Hello, on the shader side you'll simply need to set your properties as Instanced.



    You may also refer to our 'SimpleGPUInstancing' sample located in the 'AmplifyShaderEditor\Examples\Official\SimpleGPUInstancing' folder as an example.


    Hey there, since the HDRP is making use of the Stencil Buffer internally, you'll have to make sure that your Stencil Buffer Reference value is set to 1 to ensure that the template behaves in the same way as Unity's HD Lit shader.

     
    KRGraphics and deab like this.
  8. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    We've uploaded uploaded a new build into our website.

    This build was mainly created to address some of the issues regarding HDRP.

    Here are the release notes.

    Release Notes v1.5.8 rev 03:
    • Fixes:
      • Fixed multiple issues in both PBR and Unlit templates for HD SRP v4.x.x
      • Fixed issue over clip space transforms on HD SRP
      • Fixed issue on sampling depth buffer on HD SRP
    We do apologize for all these issues regarding HDRP but hopefully we will be able to address them all.

    Have a great weekend and happy shader creations!
     
    SunnySunshine and KRGraphics like this.
  9. agreeablegames

    agreeablegames

    Joined:
    Nov 20, 2016
    Posts:
    14
    Hi,
    I'm attempting to use the latest 'Grab Screen Color' node with LWRP. Unfortunately, it's giving me this error:

    undeclared identifier '_CameraOpaqueTexture'

    I've checked the opaque texture box on the pipeline asset, is there anything else I need to do?

    Thanks!
     
  10. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    688
    Okay, thanks for pointing that out. Perhaps the stencil buffer reference value should default to 1 when creating a HD PBR material so the user doesn't have to configure it manually.
     
    KRGraphics likes this.
  11. Darthlatte

    Darthlatte

    Joined:
    Jan 28, 2017
    Posts:
    27
    Hi should the transparency issues with HDRP be resolved in this update? I just tried it with the same setup as posted earlier and instead of being all black now my material is 100% opaque (but with albedo color). Am I doing something wrong in material setup?



    Also alpha and thickness are set to 0.15. Thank you
     
    Last edited: Nov 10, 2018
  12. witcher101

    witcher101

    Joined:
    Sep 9, 2015
    Posts:
    489
    Hello is this similar to unreal engine. Is it possible to duplicate unreal materials in to unity. Also does it support master materials like unreal??
     
  13. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    156
    Thank you very much
     
  14. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,108
    Translucent is not transparent, if I'm understanding correctly. It's an effect that gives an appearance of translucency, but no transparency is actually involved. It's opaque.

    Or do I have that wrong?
     
  15. Darthlatte

    Darthlatte

    Joined:
    Jan 28, 2017
    Posts:
    27
    I guess I don't really know, but I tried both standard and then translucency as a last resort - but still no dice :-/
     
  16. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    217
    Hi, I tested the HD PBR v4 template yesterday and the Reference stencil buffer is set to 2 by default, just to let you know :D
    I have a question, could we have a Custom Material Type, with all the inputs exposed on the main node? Since all the keyword are already defined i think it won't be a problem. With a custom shader GUI and a Material Type enum, we could make the shader similar to what unity have. Thanks!
    upload_2018-11-12_11-24-38.png
     
  17. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, we've noticed that, even though the Camera opaque color can reportedly be requested on the pipeline asset from version 2.0.0+, it's only currently available on version 4.0.0+.

    You'll have to be using Unity's 2018.3 Beta and install the SRP 4.0.0 together with our non-legacy LW template in order to use this.


    No problem, we've set the default to 2 intentionally since it's that same value that Unity is using on its default templates, and its being used for the other Material Types, SSS being the sole exception.


    Hello, Translucent and Transparency are different, if you want to make a transparent shader in the HD template, you should set it up as follows:




    Hello, thank you for your interest! There are some similarities between both tools and, since most of the knowledge is definitely interchangeable, so its possible to adapt shaders or tutorials from other sources, such as UE4, to our editor.

    ASE also provides Shader Functions, custom reusable node networks that can be shared across projects similarly to Unreal Material Functions.

    Regarding master materials, this is something that is available but is handled somewhat different in Unity, you can find more information here.
    In short, you can create as many different materials with different settings for the parameters that are defined by the one same shader that renders them, as an example.

    Please let me know if you have any further questions.


    Correct!


    Hey there, the value is set to 2 by default intentionally, since it's that same value that Unity is using on its default templates, and its being used for the other Material Types, SSS being the sole exception.

    Regarding your suggestion, we should be able to add that, I'll pass it along to the developer for further consideration, thanks!
     
  18. agreeablegames

    agreeablegames

    Joined:
    Nov 20, 2016
    Posts:
    14
    Thanks for the reply, it's good to know that it's officially supported in the new beta!

    I managed to get it working in 2018.2 and SRP 3.0 by adding the following two lines to the Lightweight PBR template, after the regular #include lines.

    TEXTURE2D(_CameraOpaqueTexture);
    SAMPLER(sampler_CameraOpaqueTexture);
     
  19. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    217
    I see. I thought it should be 2.
    Ok, thank you!

    I just found a bug in the UIDefault template and it is not working with Transparent mode. The UNITY_UI_CLIP_RECT def is missing from the following line.

    Code (CSharp):
    1. color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
    It should be this, at least in Unity 2018.2.15

    Code (CSharp):
    1. #ifdef UNITY_UI_CLIP_RECT
    2. color.a *= UnityGet2DClipping(IN.worldPosition.xy, _ClipRect);
    3. #endif
    Thanks!
     
  20. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you for providing a workaround for this, I'll pass this information for the developer so that we may include a fix for our legacy template.


    No problem! Thank you for the heads up, could you please elaborate on how to replicate this issue, as our UI samples seem to be working fine on that Unity version?
     
  21. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,621


    Greetings everyone,

    It's time to take your Substances to a whole new level with ASE. Manipulating Substances via shader is a great way to tweak your assets without needing to recalculate them.

    Happy to announce that ASE is now compatible with the new Unity 2018 Substance Plugin!

    Learn more: Asset Store
     
    Last edited: Nov 13, 2018
  22. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    217
    Sure. It only happens when using a sprite renderer, it is working fine if I use an Image component.

    upload_2018-11-13_16-45-31.png

    So I did a quick diff test between unity's Default UI shader and ASE UI template. Here are the differences.
    upload_2018-11-13_16-49-5.png

    If I add the define, everything is working file. Hope it helps :)
     
  23. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you for the thorough example, we really appreciate it!

    I've passed this information to the developer so that he may address this issue as soon as possible.
     
  24. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,997
    YAY
     
  25. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    A new build was uploaded into the website

    Here are the release notes:

    Release Notes v1.5.9 rev 00/01:

    • Improvements:
      • Added Auto Gamma to Linear option into 'Color' nodes when set to Constant
      • Added access to all 8 uv channels on 'Texture Coordinates' and 'Vertex TexCoord' nodes
        • Only for Unity 2018.2 and above
    • Fixes:
      • 'Grab Screen Color' node now also working on Lightweight SRP v3.x.x
      • Fixed possible issue with Shader Function creation callback not being inside AmplifyShaderEditor namespace
      • Fixed 'Gamma To Linear' and 'Linear To Gamma' compiler errors on SRP v.4.x.x
    Please notice that, although we can now have 8 uv channels per mesh over Unity 2018.2 and above, it will throw a compilation error if you attempt to use the last four channels on a surface shader. On vertex/frag (templates) all 8 channels can be used without restrictions.

    Happy shader creations!
     
    Last edited: Nov 14, 2018
  26. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    212
    Btw i never got around to posting, but i resolved my previous issue for the most part.

    I do want to report an issue with using Japanese characters in the file path causing substance source to break...
     
  27. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Thank you for letting us know! Can you specify which file path you're referring to?

    If you suspect that the issue is Unity related, first make sure that it's not present in the Issue Tracker and then follow their Bug Reporting Guideline.
     
  28. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    212
    It was one of the directories before it gets to the project folder. I've encountered a similar problem before with terrain composer where the project folder name having a space in it caused a nasty glitch making terrain composer unusable entirely.

    In this case having a japanese character at any point in the project folders directory seemed to completely break substance source.

    I'll report it soon.
     
    Amplify_Borba likes this.
  29. chaza_li

    chaza_li

    Joined:
    Jan 8, 2018
    Posts:
    29
    Hi there,

    Is it possible for the result of a lerp node to be stored in any node so that the result texture can be accessed through C# script? For example, in a variation of a Texture node so that it can be retrieved through material.GetTexture?

    Thanks!
     
  30. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    83
    I'm using a flat transparent shader (thanks to @Amplify_Paulo) to fade doors etc that are in the way. Looks like this:


    Left - normal shader, right - faded shader.

    I'd really like to keep the objects shadow (see how the light is passing through on the floor). Is this possible via the shader? I suspect it might be by adding another pass - but that's beyond my level and I may be wrong!

    Here's the faded shader:



    Thanks in advance for any assistance!
     
  31. sacb0y

    sacb0y

    Joined:
    May 9, 2016
    Posts:
    212
  32. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    688
    Can't you just check "Cast shadows"?
     
  33. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    83
    Tried this, but the results are weird. Hard to see here, but mostly no shadow, but some banding:

     
  34. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! This could be possible, although you will likely have to resort to additional steps to extract a texture from a shader, such as the ones discussed in this thread, as this is beyond the scope of our editor.


    Hello, this is possible to achieve on the Standard Surface shader through the following setup:



    Do note that you'll also have to turn on the 'Cast Shadows' parameter.


    Thank you for the heads up!
     
    RogDolos, SunnySunshine and deab like this.
  35. deab

    deab

    Joined:
    Aug 11, 2013
    Posts:
    83
    Brilliant thank you, worked a treat! Plus I learnt something!
     
    Amplify_Borba likes this.
  36. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    1,534
    I know HD Lit support is on the way (really waiting forward to that myself) but we have/will soon have (5.x.x) Fabric, StackLit and Hair Graphs for the HDRP as well.

    I'm curious, what is the grand plan on HDRP support, will ASE eventually support all upcoming graphs or will it just focus on the "most" important ones?
     
    deab likes this.
  37. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, we're hoping to support any graphs that we can, as long as they make sense in the context of our editor.

    We are unable to offer any estimates though, as these systems are still work-in-progress, so we'll be adding them as soon as possible.
     
    rz_0lento likes this.
  38. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    217
    Hi everyone,

    I've been working lately on some material property drawers, one of them being a Category drawer and I was thinking that some of you will find it useful. It draws a rectangle with a category text instead of a property. For everyone interested, I attached a package with an example shader. It can be used with ASE or any other shader by using the [Category(My Category)] attribute on any material property.
    Since a property can have multiple drawers and decorators, collapsing/expanding can be a bit tricky to do, so no support for now.

    @Amplify_Borba If you guys find it useful, I'll be glad to see it included in ASE for everyone intereseted.

    Here is how it looks:
    CategoryDrawer.jpg

    How to with ASE:
    1. Create a new float, make it a Property with Auto-Register enabled
    2. Create a new Custom Attribute: Category(My Category)
    3. If the Category's string is missing, the float's name will be used instead
    4. The exposed property will be replaced in the inspector with a Category rectangle

    With some custom textures it can be customized further. One example of my shader:
    CategoryDrawerBox.jpg

    Have a nice day!
     

    Attached Files:

  39. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, thank you for your kindness, I've shared this sample and information with the developer for further consideration.

    As always, proper credit will be given if we do implement this.
    Keep up the good work!
     
    BOXOPHOBIC likes this.
  40. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,997

    This is going to be useful as HELL. especially for shaders with a lot of options :)
     
    Amplify_Ricardo and BOXOPHOBIC like this.
  41. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,621

    Christmas Came Early This Year! Get Amplify Shader Editor, Playmaker, Ultimate VFX, and much more at a discounted price with the Asset Store Quick Prototyping bundle!

    Learn more: Asset Store
     
  42. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,997
    Speaking of shaders, I'm still having issues with my hair shader not compiling as well as trying to figure out how to add passes to the shader. (It's not exactly artist friendly)
     
  43. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    We understand that this is quite an advanced and complex feature, and we're definitely hoping to improve it in the future in order to make it more artist friendly, so all feedback is welcome!

    Although we have included two tutorials for single and multipass templates in ASE's Wiki Manual, together with a MultiPassDistortion sample ( AmplifyShaderEditor\Examples\Official\MultiPassDistortion ), please let us know if there's anything that you believe is lacking in terms of information or could be improved in some way.
     
  44. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    We've uploaded a new build into our website.

    Here are the release notes:
    Release Notes v1.5.9 rev 02:
    • New Nodes:
      • Vertex Id
      • Primitive ID
    • Improvements:
      • Matrix type nodes can now be GPU instanced
    • Fixes:
      • Fixed issue with 'Fresnel' node with Tangent Normal vectors on Surface shaders
      • Fixed issues on Motion Vector pass on both 3.x.x. and 4.x.x templates
      • Fixed issue with world pos generation on HD 4.x.x

    Happy shader creations!
     
  45. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    688
    Interesting. Would this make it possible to read data from ComputeBuffers using the vertex id?
     
  46. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    Yes, this internally adds a variable to our vertex data using the SV_VertexID semantic, and one of its uses is exactly that.
     
  47. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    688
    That's cool!
    Does Amplify Shader Editor support ComputeBuffers or would that have to be done with custom expressions or includes?

    Also, how does VertexID work with tessellation?
     
  48. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,997
    I'll have to very slowly read the docs. And make a backup of the file
     
  49. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    513
    For now you need to rely on Custom Expressions/Global Array nodes and Includes to make use of it. We don't supply any means on defining StructureBuffers inside ASE.
    Regarding Tessellation, Vertex ID comes from vertex data to the vertex shader which happens before the hull shader stage. I'm not quite sure how ids are assigned(or not) to new vertices generated by tessellation.

    We do apologize for the documentation to be a bit confusing. It really needs an overhaul to be more clearer and also update it with the functionalities we've implemented over these last few months.
     
  50. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    3,997
    So reading the docs, the part that messes me up is the wall of text that has all kinds of stuff in it. What I am trying to do in my hair shader is add two extra passes for the hair. And that would mean adding two subshaders (One with Cull set to front, and the other to back), but all of the extra code, it makes it hard to add all of this. I'm editing the template itself and not the shader.

    I'll have to reference the Alloy Hair Shader to figure out how to do it. It would be kinda nice to do this in the shader editor itself...

    Also my shader won't compile
     
    Last edited: Nov 21, 2018
unityunity