Search Unity

[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. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    95
    Hey guys,
    I trying to figure out how to make Sprite Renderer flip feature work with the shader.
    Could someone help me?
     
  2. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    That was fast, thanks a lot!
    The only reason I'm still on 5.6 is that I develop some new tools for the asset store that will have ase support and I want to support as many versions I can. But I will switch to 2017.1 and only support older versions where is possible.

    Thanks again !
     
  3. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    One more question. Is there a way to have shadows when Custom Blend Mode is enabled and both Opacity and Opacity Mask are used in a custom lighting shader? What about semi transparent shadows?
    The shadow is working when Standard lighting is used (right), but not in custom lighting(left). I also attached the scene if you want to take a look.

    upload_2018-4-5_13-55-22.png
     

    Attached Files:

  4. sazberryftw

    sazberryftw

    Joined:
    Dec 12, 2016
    Posts:
    39
    Hey, are there any performance implications by registering and getting lots of local variables within your shader? :)
     
  5. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, the Sprite Renderer flip feature should work without issue, I've just tested flipping both X and Y axis on our SimpleSprite sample through the MySprite gameobject's inspector, and its working as expected.

    Could you please provide any further information? Thanks!


    Thank you for providing a sample, our developer will investigate this as soon as possible and we'll report back with our findings!


    Hey! When you register a graph, even if you use several "gets", the registered graph's code will still only be created once in the shader, so there should be no impact at all on the shader's performance.

    If by any case you notice any performance hit due to the use of these nodes, it would likely be an issue that we'd have to correct on our side.
     
  6. sazberryftw

    sazberryftw

    Joined:
    Dec 12, 2016
    Posts:
    39
    Great thanks! No, I haven't noticed anything, I just wanted to double check incase I'm over-using the feature. :)
     
  7. TimNedvyga

    TimNedvyga

    Joined:
    May 18, 2015
    Posts:
    95
    Yeah that strange, this did not work only in one project. So I tried to delete SpriteRender then add it again and it works... now everything ok

    Anyway thank you ^_^
     
  8. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Hey,

    Please share skin shader in default example.
     
  9. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155
    Hello everyone.

    I wasn't able to find the new "Melting" sample in the latest download, is it normal?

    I was also wondering if we could have examples of samples using cleverly multi pass shaders in order to have an example of what is now achievable with this new feature? (I heard that a fur shader sample was in the making using it, but I might be wrong).

    Keep up the good work!
     
  10. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, I've registered your suggestion, thanks! Hopefully we can provide a skin sample in the near future!


    I've just tested the latest build we provide through our website and the sample is present, did you download from our website or from the Asset Store? Have you tried to re-import the package? Please confirm in the package importer if the sample is present in Assets / AmplifyShaderEditor / Examples / Community / Melting, and if its contents are all selected, thanks!

    Oh, we're also going to release a new build today, if you'd rather wait a little longer before importing ASE into your project.

    Regarding your request, we're working on a few new samples that will make use of the new features, so stay tuned!
     
    arnoob likes this.
  11. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    A new build was just uploaded into our website.

    Here are the release notes.

    Release Notes v1.5.1 dev 06:

    • Improvements:
      • Added preview to 'Noise Generator' node
      • Improved node internal data viewer performance
      • Improved the shader changed/dirty flag behavior
      • Improved graph canvas position adjust on loading from a previously different window configuration
      • Renamed 'Melting' sample shader to be in accordance with other community samples
    • Fixes:
      • Fixed property node auto-register issue on 'Skybox - Cubemap Extended' sample
      • Fixed issues with 'World Normal' and 'World Reflection' nodes on PS4
      • Fixed multiple cast issues across multiple nodes
      • Fixed incorrect port behavior on 'Refract' node
      • Fixed issue on undoing instanced properties assignment
      • Fixed 'Break To Components' node duplicating code and generating errors
    Hope you all have a great weekend and happy shader creations!
     
    KRGraphics, arnoob and AthrunVLokiz like this.
  12. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    I've tried and it works.
    Thank you
    Anyway I've also sent to ASE support the shader so they can investigate better what's going on.
     
  13. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    You should have in your support email.
    Thanks in advance
     
  14. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    Off topic... The team at Amplify is awesome... I can't wait to see this shader system evolve to greater heights... As a visual effects CG artist, I truly thank you guys for the products over the years I've been a dev. I still remember Amplify Motion in Unity 3/4... you guys are top tier... keep that going.
     
    Amplify_Borba and Amplify_Paulo like this.
  15. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    736
    Thanks
     
  16. Suzuka91

    Suzuka91

    Joined:
    May 7, 2014
    Posts:
    39
    Hi! First time writing here.
    I'm making a shader that modifies a sprite color according its Z world position, and I'm using the node 'Blend Operations' for blending colors.
    The shader works perfect, but I created a function in order to reuse the code, and now looks wrong.

    Screenshot - 07_04_2018 , 19_17_17.png

    But if I change the blending color type to Soft Light, it shows as expected:

    Screenshot - 07_04_2018 , 19_18_30.png
    But most of the blending types shows that alpha """error""" (only when I use my custom function (all blend types shows nice if I don't use a function).

    I even tried to make an input in the function for the original alpha value, and appending it at the "end" of the function, just to be sure it's not modified, but don't work.

    If I move the function's code to the original shader, works perfect.


    I made a simple shader where happens the same, just in case you want to recreate it:
    I'm using the sprite template, and I didn't change the blend modes of the shader.
    Version is the last on Asset Store (1.5.1)
    Screenshot - 07_04_2018 , 23_25_18.png

    After replacing with the function:
    Screenshot - 07_04_2018 , 23_27_44.png

    Function:
    Screenshot - 07_04_2018 , 23_29_21.png



    Ah, another question. Everytime I modify a custom function, in order to see the changes, I must press "create and apply shader to material" on every shader/material (that uses the function) in order to refresh them and see the changes (I have enabled the automatic save on every shader). Is this normal?
    If it's normal, it would be awesome to have some kind of button that automatically refresh all the shaders that have a reference to that function. I don't know if that could be possible, but it would be great.


    Ah (again), another feature that I think that it would be super useful.
    Sometimes I added an 'add' node (no pun intended) and then I realized that I wanted a multiply node instead (for example).
    It would be awesome to have some option like "replace" when right-click on the node. It would show a list of possible nodes to replace the actual node. (With possible nodes I mean nodes that have the same inputs and outputs as the selected node (It wouldn't make sense to replace a multiply node with a vertex position node, for example)).

    These are only suggestions that I personally would find useful, I don't know if they are possible to implement.
     
    Last edited: Apr 7, 2018
    KRGraphics likes this.
  17. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hi suzuka, welcome!

    About your issue, it seems like a bug, from the images you posted you seem to be doing everything right. I suspect something went wrong with the append node but this is just a guess. I'm going to investigate further and if I fail to replicate the issue I'll ask for your shader. Sorry for the inconvenience :|

    About your suggestions:
    That's a somewhat common request and we completely want to do it. The only reason it hasn't come yet is because it's technically time demanding and has a lower priority. What I mean is, in order to be possible to do that we need to create and maintain a local database that connects where each function is being use to be able to order a compilation for the shaders using them. This not only will take time to create but also raises other questions about how to use them (will they always update the shaders? can you choose? how do you choose? how do they compile? etc). So it's something that will reflect on other things and will take time, so for the time being we have our priorities set in features for shader creation and only when those get more stabilized we start on that.

    Your other suggestion is also something we have been thinking on and might be closer to release. Currently the right click is only being used to pan so there are lots of potential on what we can do with a context menu, replacing nodes is just one of them. So we are totally on board with that, we just need some time to figure out how we wanna do it :p

    Hope that makes sense. Keep the suggestions coming, even if they have been made before, in the very least it lets us measure what everyone wants.

    cheers
     
  18. Suzuka91

    Suzuka91

    Joined:
    May 7, 2014
    Posts:
    39
    Thanks for the answer @Amplify_Paulo :D

    About my problem, don't worry, I've just found it's "solved" by adding this:
    Screenshot - 08_04_2018 , 11_57_33.png

    The append node I think it wouldn't be necessary (I don't think the blend operations affects the alpha), but since the issue only happened with some blend types, I added it just to be sure the alpha wasn't modified.
    And since its not modified in the function, my solution shouldn't be doing anything, but it works. Somehow the alpha is being modified when enters the function, even If "ignore" any change with the append node.

    About my 1st suggestion:
    What about a button (or adding an option when right-click on save button (just to keep "clean" the UI)) that saves all shaders that are currently opened? Personally, that would be enough for me (specially if the creation of a database could in someway affect the editor performance).
    We could have opened all shader we are working to (I use to) and then by selecting "save all" could save all tabs we have open.
    It's much simpler.

    Thanks for yout attention and keep up the good work. ASE is already awesome, looking forward to see what's coming next!
     
  19. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    That is not a bad idea for an intermediary solution. Thx for the suggestion.

    About the original issue, I can confirm my initial assumption about the append node. You already found a work around but we'll be fixing it anyway of course, you can expect a fix in the next release or so.
     
  20. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello!

    Could you please confirm if you still have issues with the Sobel sample on the latest ASE version, available for download through our website? We've fixed a few issues that might have been related to yours, and haven't been able to replicate this on our side, thanks!
     
  21. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    There was an issue with how the alpha port was being treated when in custom lighting mode, we've fixed this and it should work correctly in the next build, which will be released later today, thank you for reporting it and providing a sample!
     
  22. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    Hope you had a great weekend.

    Here's a new build to start off the week. This one was also submitted to the Unity Asset Store and should soon be available over there.

    Here are the release notes.
    Release Notes v1.5.2 dev 01:
    • Fixes:
      • Changed alpha generation for Custom Lighting to work correctly with alpha mask
      • Fixed issue on shader function reloading not being taken as a load operation
      • Fixed instanced properties not being correctly taken into account inside shader functions
    • Improvements:
      • Improved shader function asset loading on Shader Function node

    Happy shader creations!
     
    KRGraphics likes this.
  23. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    After running some tests and confirming our findings with Polybrush's Developer, we've concluded that it's not possible to have GPU Instancing and Vertex Streams at the same time, however, he did point out that there's an option in Polybrush which deactivates additional Vertex Streams ( in the settings tab of the plugin ), making the brush create a new mesh instead.

    By enabling this you may then deactivate GPU Instancing and let the Dynamic Batching kick in, which won't be as efficient but it's the only available solution. Please let us know if this helps, thanks!
     
    Last edited: Apr 9, 2018
  24. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    hi guys, theres anyone knows how to create a Infinity led Mirror without the use of render texture?
     
  25. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, one possible way to achieve this effect would be through the use of Parallax Mapping, I'm attaching a sample that makes use of this node, which you can examine and use as a starting point for your intended shader.



    Do note that this shader is somewhat expensive in terms of performance.

    Please let me know if this helps, thanks!
     

    Attached Files:

    Last edited: Apr 11, 2018
  26. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    I hope this means I will be able to use opacity masks for my hair shader... that is the only thing that has kept me from using it.
     
  27. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    Hi everyone,

    We just uploaded a new build into our website.

    Here are the release notes.

    Release Notes v1.5.2 dev 02:
    • Improvements:
      • Added Safe Normalize option to 'World Space Light Dir' node
        • Assures vector is not zero even if there's no lights in scene
      • Added Safe Normalize option to 'View Dir' node
        • Assures vector is not zero even if there's no cameras on scene
      • Property names can neither be or start with numerical values nor unity reserved names
      • Variables from 'Register Local Var' nodes cannot start or be numerical
    • Fixes:
      • Fixed shader function subtitles not being shown after being set with the 'Function Subtitle' node
      • Fixed Custom Lighting using opacity and opacity mask duplicating code
    Happy shader creations!
     
  28. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, as Rick pointed out above, we've just released a new build over at our website in which we've squashed this bug, thank you for taking the time to report it!
     
  29. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,209
    Can someone give me a hand with using a texture as a mask to overlay one color on top of another? Say I'm using a color for my diffuse, red for example. I would like green on top of that, but only show the green based on a black an white texture. Thoughts?

    Thanks.
     
  30. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    OMG! thanks, is there a way to array the parallax mapping for this instance?

    performance in VR is great! no lost of framerate
     
    Last edited: Apr 11, 2018
  31. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! You could accomplish this by using the Lerp node, which allows you to blend between two values according to a third one. Feel free to check our wiki page for this node as it contains more information regarding the Lerp operation, as well as a sample setup that should help you get started.

    Let me know if you have any further questions!


    No problem, thank you for sharing details regarding its performance!

    Unfortunately, theres no way to array the parallax mapping.
     
  32. EscalatorSafe

    EscalatorSafe

    Joined:
    Apr 12, 2018
    Posts:
    21
    Hello,
    I have noticed when using functions it can mess up the inspector for the material, placing variables under the wrong headings. It appears to happen when you add a function inside of another.
     
    Prodigga likes this.
  33. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hey there, thank you for reporting this issue!

    We've just confirmed it on our side and will look into possible solutions, thanks!
     
    Prodigga likes this.
  34. BOXOPHOBIC

    BOXOPHOBIC

    Joined:
    Jul 17, 2015
    Posts:
    508
    I just want to say that it is working properly with the new updates. Thanks again guys !!!

    Is there an impact on shadow rendering performance if I render the object as Opaque, but I have a texture plugged in the Opacity Mask slot?
     
  35. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    No problem, thank you for reporting back!

    There will be an impact in rendering performance since the texture will have to be tested for when it occludes or not the shadow.
     
  36. Noors84

    Noors84

    Joined:
    Jul 12, 2016
    Posts:
    78
    Hey. I'm not sure what i'm doing wrong there with the unpack scale normal but i fail to get the correct normals. I'm on Unity 2018.1.0b5
    Any hint ? Thanks !
     
  37. wlad_s

    wlad_s

    Joined:
    Feb 18, 2011
    Posts:
    148
    Hello,

    Is there a tutorial or a sample on how to create the sparkle or glitter effect with amplify shader editor?

    Similar to this


    Thanks
     
  38. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    Sorry for asking a really basic question, but I looked through all the nodes in the documentation online, and I can't find one which accepts separate values for r g b and a as input and produces rgba as output. I guess I'm missing something obvious, as I'm just trying to enable a per object fade out using an alpha float value:

    Capture.jpg
     
  39. Prodigga

    Prodigga

    Joined:
    Apr 13, 2011
    Posts:
    1,123
    Append node
     
  40. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello, could you please send us a sample with the texture included so we can test it on our side?

    Thanks!


    Hey there, you're in luck! We've recently introduced a glitter sample in our SRP Package, the SRP Lightweight GlintSparkle, which you may use as a good starting point for that sort of effect!



    You need to be using Unity 2018 and have their Lightweight SRP package installed, then extract our SRP Samples.unitypackage in order to access this sample.

    Feel free to check out our ASE SRP setup tutorial video for detailed instructions, and be sure to let me know if this helps or if you have any further questions, thanks!



    No problem, we're here to help!

    As Prodigga was kind enough to point out, the Append node seems to be what you're looking for!
     
    wlad_s and Furry like this.
  41. Amplify_RnD_Rick

    Amplify_RnD_Rick

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

    We've just uploaded a new build over our website.

    Release Notes v1.5.2 dev 03:
    • Fixes:
      • Fixed issue with 'Grab Screen Color' node on Lightweight SRP template
      • Fixed multiple issues with Shader Model selection over templates
      • Fixed issue on not correctly syncing module data from modified template
    • Improvements:
      • Re-factored local variable creation over ports to make it more robust
      • Vertex ports are now analyzed before fragment ones
        • Vertex position dependent operations now take applied offsets into account
      • Pragmas, Includes and Defines are copied from linked nodes if Pass is set as invisible
      • Added preview to 'Vertex To Frag' node
      • Small optimization on drawing connections
      • Minor tweak over Particles Alpha Blended template
      • Assigned dynamic interpolators now take both sub shader and pass info into account
        • Modified Lightweight SRP template to share dynamic interpolators amount over hidden passes
    WARNING!
    Yep, this is one of those builds ... we did quite some changes on how ports on the output node are analyzed and how local variables are generated.
    We strongly advise to backup both shader and previous ASE version before trying out this one.
    Please report any issues or strange behaviors and we will tackle them as soon as possible.

    Hope you guys have the coolest of weekends and happy shader creations!
     
    KRGraphics likes this.
  42. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467

    Sweet... I will take the latest changes for a spin. Particularly using opacity maps with custom lighting...
     
    Amplify_RnD_Rick likes this.
  43. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Hi. I understand that it can be limited but what is status with Amplify Shader Editor's deferred rendering path? I know the lighting is limited on that but I would like to find out if the asset do support it in some limited way or another?

    Thanks.
     
  44. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    hi devs, possible to have the GlintSparkle for 2017.3?
     
  45. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    A sea of posts here so tough to search this out.

    Is it possible to directly convert / open up a shader forge shader? or would it need to be manually done?
     
    MP-ul likes this.
  46. OP3NGL

    OP3NGL

    Joined:
    Dec 10, 2013
    Posts:
    267
    if u have shader forge before, replicate the nodes in amplify manually
     
    wolfen231 likes this.
  47. wolfen231

    wolfen231

    Joined:
    Apr 22, 2014
    Posts:
    402
    Was afraid of the manual route haha. Wish there was a way to just import but I figured that was a long shot. I have shaderforge of course... because it was it in the past.

    Thanks for the response. =)
     
  48. Noors84

    Noors84

    Joined:
    Jul 12, 2016
    Posts:
    78
    Hello
    There you go. Shader and texture. Thanks !
    Unity 2018.1.0b5
     

    Attached Files:

  49. ekergraphics

    ekergraphics

    Joined:
    Feb 22, 2017
    Posts:
    257
    Following on my question from last page, I can't seem to make my shader transparent (compare with the built-in Unity unlit transparent shader):

    Capture.jpg

    My goal is to make a transparent shader that I can fade out over time with an alpha value through script.

    Also, new question:

    Is it possible to create an outline effect in Amplify Shader Editor which can be applied to any object as a highlighter effect? Or does every object then have to have a "duplicate" standard shader made in Amplify with the addition of an outline that I have to enable/disable through script?

    (I looked at how Valve does it for their SteamVR InteractionSystem highlight, and they seem to add a duplicate mesh of the object, to which they then apply a shader that only displays an outline and nothing else... but I use really heavy object so I don't think I can do that without affecting performance a lot, but it's a neat solution).

    EDIT: Unlike Valve's outliner shader, yours do not respect multiple objects. How can I make it only draw a single silhouetted outline per material?
     
    Last edited: Apr 16, 2018
  50. Amplify_Borba

    Amplify_Borba

    Joined:
    Jul 24, 2017
    Posts:
    538
    Hello! What do you mean by saying that "Lighting is limited? Are you looking for anything specific or simply asking if ASE supports the creation of Deferred shaders? If so, it's currently possible to create Deferred shaders. Please do elaborate, requests are very welcome!


    Hey there! The GlintSparkle uses a shader template that supports the Lightweight SRP, however, it may be easily converted to a standard surface shader by following these steps in either Unity 2017 or 2018:

    - Extract the SRPTemplates.unitypackage, which contains the LightWeightSRP.shader that you need to open the GlintSparkle Shader
    - Extract the SRP Samples.unitypackage, containing the GlintSparkle Shader, scene and materials
    - Ignore errors and warnings
    - Open the SRP LightweightGlintSparkle.shader
    - Take note of how the ports in the Output nodes are connected
    - Select the Output node and change the Shader Type to Surface Shader
    - Compile
    - Reconnect the ports in the Output node
    - Compile again

    The shader will now be working as a Surface Shader, feel free to edit it or create a new material to assign it to.

    Do note that, if you've opened the sample scene for this shader, the pink surfaces are from other Lightweight SRP materials.

    Let me know if this helps, thanks!


    Hello, I'm afraid you'll have to do this manually, apologies for the inconvenience!


    Thank you for taking the time to send us the requested sample!

    Upon testing your shader, I've noticed that there seems to be an issue with how the Unpack Normal node behaves on different Unity versions, this has been escalated to the developer for further investigation, we'll be sure to let you know as soon as we have any developments, thanks!


    Hey there, you're on the right track, next you'll have to connect the Multiply's output to the Opacity port in the Output node in order to produce a transparent surface.

    On a sidenote, we also provide some UI specific samples, achieved via Shader Templates, that are available in the following folders:

    - AmplifyShaderEditor / Examples / Official / TemplateExamples / UI folder, and in the UISpriteFX
    - AmplifyShaderEditor / Examples / Official / UISpriteFX

    Feel free to check them out!


    Regarding your other question, the Outline that we provide in ASE is per-object and limited to Forward rendering, however, it's definitely possible to develop a custom solution for an outline effect that respects multiple objects, but it does require some work.

    As a good reference I recommend that you check out this post, where an outline shader was shared by another community member, which makes use of our Shader Templates to create a Post-Processing shader that draws an outline on any edges that are detected on the screen.

    Please let me know if this helps, thanks!