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

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

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Since Unity uses Stencil Buffers internally, this can be a bit problematic with Deferred.

    Realtime noise generation can be expensive, using a texture is usually recommended.

    Not something we've seen regarding the blur; depends on what exactly you need/mean by pass. URP has an extra pass for specific uses, as an example. You might need to look into a Custom Multi-Pass template: Wiki Reference

    Let me get back to you on that.
     
  2. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    558
    I'm working on a volumetric explosion shader and for it to work properly it needs to be opaque and cutout for an accurate Zwrite. So instead of transparency I use 3d perlin noise to fade it out. I need a second pass on top of it for the shader to blur out the noisy parts so they look more smoke like and transparent.

     
    florianalexandru05 and Eggpunk like this.
  3. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Unless we're missing something here, we don't think that multipass is going to work as you have in mind; might not be the way to go. If you want to blur the result you'd create a screen shader that takes those pixels and blurs them; if you have a second pass you might not be able to reach pixels "outside of the original geometry."

    The screen shader alternative could be sufficient for your case but if you're really looking to try a multi-pass you're going to have to create or customize one of the existing templates. There's no tutorial for that other than the wiki information on our website. Speculating here but you could use a grabpass on the second pass and do a 4-tap blur or something fast as this could be a bit expensive.

    This is an advanced topic but if you're interested in trying it out you can start by duplicating the pass on the template and change its tags(not sure if this is not going to cause render order issues, it's really one of those that you have to try out to be sure)
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,827
    GTA4 or 5 uses anti alias to smooth dithering into a transparency.
     
  5. WeltenbauerRenn

    WeltenbauerRenn

    Joined:
    Jun 20, 2017
    Posts:
    29
    Hello Amplify Support,

    I'm creating a master shader for my project (HDRP 7.21, going to 8.2.0). I want to toggle Alpha clipping per material like in is done in HDRP/Lit. I get the same "Surface Options" als HDRP/Lit. But it seems the clip threshold doesn't do a thing. I guess the shader used the hardcoded value of 0.5. Is there a that the graph can use the value from "_AlphaCutoff" for the cutout?

    Also can I expose a decal toggle like HDRP/Lit?

    Thank you for your time.
     
  6. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    558
    Is there a way I can blur just the meshes using this material with screen shaders rather than the whole screen?

    Temporal Anti-aliasing helps it to a small degree which is what I used in that video but I have to assume the users might not want to use temporal anti-aliasing. So I'm looking for a general solution.
     
  7. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Perhaps with a Render Texture.
     
  8. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    558
    ok thanks.
     
  9. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849

    Hey there,

    1. Try this, use your own float to control it.
    upload_2020-7-31_10-20-42.png

    2. Not possible, also related to the first question, we're using SG Material Inspector, we can't really control that. There are a couple of issue related to this, not shader but Material Inspector related, that we'd like to improve in the future. There are also a few Material Inspector related issues on Unity's side that we'd like to see corrected in the future such as the disappearing contents of your material; it's important to note that this happens with Shader Graph as well.

    Apologies for the inconvenience.
     
    syscrusher and laurentlavigne like this.
  10. WeltenbauerRenn

    WeltenbauerRenn

    Joined:
    Jun 20, 2017
    Posts:
    29
    Hello,
    thanks for the reply. This workound would be same thing I would do. I was just asking to take over as much parameters as possible when transitioning from HDRP/Lit to the new Shader. But ok this one can be fixes from scripting.

    I wanted hide and show some parameters in some situations and found out, that all the shader gui stuff is well hidden in their package namespace. So I ended up writing my own (change 10+ classes was a bit to much), thanks for allowing me to assign a custom editor :)
     
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Ah glad you have a solution, using your own custom inspector is the best choice! We're a bit limited by using theirs but using a custom one as we do with Surface Shaders has proven problematic.

    Apologies for the inconvenience, I wish there was more we could do in this matter.
     
  12. matthewhxq

    matthewhxq

    Joined:
    Jul 6, 2015
    Posts:
    15
    Hello Amplify Support,
    I was trying to create new shader template based on Universal/Unlit.shader, that adds option to receive dynamic shadows as I don't need the PBR stuff, just unlit with shadows. I checked Universal/PBR.shader, but still no luck. Maybe you can help me or point me to the right direction?
     
  13. vampir26

    vampir26

    Joined:
    Mar 29, 2010
    Posts:
    102
    I created a nice looking ocean shader. Now, I'm wondering how I can get the wave height by script to detect if the camera is underwater. Can you please give me a hint? :)
     
  14. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    I recommend contacting support@amplify.pt for specific template assistance, be sure to specific exactly what functionality(code) you're having difficulty adding to a template.

    If you're looking to get shadowing you're probably going to need to use some kind of Custom Lighting. Unlike the built-in renderer, URP has a few additional requirements when it comes to displaying shadows/lighting information.

    Check this timestamp:



    Awesome, would love to see it in action. You probably want to just use a raycast, getting the height of a value set in a shader involves a bit of work.

    Here's a couple of examples:
    https://www.habrador.com/tutorials/unity-boat-tutorial/4-waves-endless-ocean
    https://answers.unity.com/questions/1415708/how-to-script-buoyancy-with-a-water-shader.html
     
  15. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    558
    Is there a way to volumetrically render something with ASE without using tricks like stacked planes?
     
  16. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Depends on what exactly you're looking to achieve; if you have a specific technique in mind I'd be happy to pass it on to the devs for additional details. I should point out that we do not currently support geometry shaders if that's what you have in mind.

    Take Calyxes for example; it's technically volumetric and uses ASE for its shaders.
     
  17. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    558
    I switched methods so now I define the smoke rolling effect in worldspace. But since I have no knowledge on how to render it volumetrically with shadows and accurate zwrite I used the stacked planes that are spread around with a particle system and just use alpha cutout for accurate shadows and zwrite. So the solution has to work like a cube that is rendered volumetrically so the particle system can use it too.

    Clayxels look pretty good for an example, it's great to learn that ASE is compatible with volumetric rendering, the only difference would be to render it raymarching cloud-like transparent.

     
    laurentlavigne likes this.
  18. aerisbueller

    aerisbueller

    Joined:
    Aug 3, 2020
    Posts:
    2
    Hello. I haven't purchased yet, but I was wondering if there is an example included which is a custom lighting version of a standard lit/pbr shader. Basically, I need something that takes and properly uses a diffuse map, normal map, ao map, and specular map in a standard way but assembled as a custom lighting setup so I can learn the basics of setting up custom lighting and tweak from there? Thanks!
     
    Last edited: Aug 5, 2020
  19. vampir26

    vampir26

    Joined:
    Mar 29, 2010
    Posts:
    102



    Hi
    Thank you for fast answer. Unfortunately, I can't figure out, how to determine the wave height. Your examples use Sine waves and my shader is using two Amplify Shader Noise-Generators. Is there a way to predict, how the noise generators will generate the noise...?

    The GIF is not working here.
    https://www.directupload.net/file/d/5901/ys5u7tgo_gif.htm
     
  20. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    That looks pretty cool actually, good work!

    Unfortunately, we're unable to assist you in actually developing your own volumetric solution. It's not an easy subject if you're unfamiliar with it but if you're interested, definitely check out sources out there like the one we referenced.

    This might also be interesting:


    Hello!

    You can do a Standard Surface with the the build-in renderer; if you're using one of the SRP's it gets a bit harder, and unavailable with HDRP. Also keep in mind that this is Forward only.



    Hey, no problem!

    Definitely check the links we shared for additional details. You can't get that value from the GPU, you'll have to use a script. https://answers.unity.com/questions...6.1242695737.1596445075-2139469768.1556633926
     
    Last edited: Aug 5, 2020
    aerisbueller likes this.
  21. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    I purchased today and the asset is amazing but I'm having issues on Unity 2017.1.0f3 (64-bit), I get this error! I have 3 versions of Unity, 2017.1.0f3, 2017.4.1f1 (64-bit), and 2019 but I need to get the shaders working for that version two. The editor seems to be working but the shaders don't, the shaders aren't pink they are just white.
     

    Attached Files:

  22. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Thank you for your purchase!

    No shaders at all? That's odd, what's the OS and target platform on the 2017.1 project?
     
    Last edited: Aug 6, 2020
  23. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Ok, this is odd; somewhat hints at a Unity issue, not actually on our side. Our developers are going to test it further; I was not actually able to replicate it.
     
    florianalexandru05 likes this.
  24. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    I see, it must be that my unity 2017.1 is broken. That could be the case. I'll figure it out if that's the case! :)
     
  25. kayronjm

    kayronjm

    Joined:
    Jun 15, 2019
    Posts:
    32
    Hi all, I'm trying something pretty simple and thought I'd ask here before I spend ages trying to figure it out.

    I have made a shader that takes a colour input for only the intensity (as this is multiplied by vertex colour set by the line renderer). I would like to access this colour input via C# code. What do I need to set up in the node to make this accessible by C# code? Also, if the node is called "Energy Beam Colour Intensity", what variable name would it have?

    Thank you!
     
  26. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    It's a strange one; I would recommend trying it on a new project until our devs have an official response.


    Hey there, the node itself just needs to be set to Property. You can access the color with .GetColor if I'm not mistaken.

    That variable would be named "_EnergyBeamColourIntensity" by default, you can set your own name if you click on the lock button.
    upload_2020-8-7_10-9-10.png
     
  27. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    Got it, it was from my side, my 2017.1 was broken, fixed after reinstall! I'll make sure to give a good review, good stuff! So I'm guessing I can make my own shaders and sell them?
     
  28. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Awesome, glad it's fixed! That was a strange one for sure.

    Absolutely, you own everything your create, feel free to distribute them as you see fit. Just be sure to remove our Custom Material inspector, or use your own, else users will get a warning if they don't have ASE.

     
    florianalexandru05 likes this.
  29. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    Great thanks! That issue seems to occur when some external tools mess directly with the Unity editor or change something in the editor, like the shade or lighting. I was using NextGen Soft Shadows... In case anyone gets this issue, shaders being white that's probably why.
     
  30. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Interesting, now that you mentioned it we've had some complaints with other products when using NextGen Soft Shadows but it was hard to pin down the cause. Not to say that package is to blame of course, we actually use it in our own game, Decay of Logos, along with all our products and we don't experience any issues; but we were using Unity 2018.
     
    florianalexandru05 likes this.
  31. Amplify_Paulo

    Amplify_Paulo

    Joined:
    Jul 13, 2017
    Posts:
    297
    Hey everyone!

    New build uploaded to both our site ( http://amplify.pt/download/ ) and Unity Asset Store ( http://u3d.as/y3X )

    Release Notes v1.8.4 rev 00:
    • New HDRP Samples:
      • Added new 'Decal Muddy Ground' and 'Decal Scifi Panel' HDRP samples using various types of decals
    • New 'Sampler State' Node:
      • Allows using the default sampler state of a texture or the creation of a new one with specific options (versions prior to Unity 2018.1 have limited support)
    • Improvements:
      • Added automatic 'Open and Save All' button in shader function files that tries to compiled all dependency shaders and shader functions
      • Texture Array tool now allows to create an asset file representing all options in order to save work for later
      • Texture Array no longer locks width and height at power of two for more recent versions of unity
      • Added clip shadow threshold and alpha to coverage options to URP PBR and URP Unlit shaders
      • You can now use custom sampler states when sampling, however, in order for this to work you need to activate the option 'Use Sampling Macros' in the main properties of the shader
        • Activating this may cause some issues in specific situations, namely, custom expressions that do sampling must be converted to use macros as well
      • There are two new connection types, one for texture arrays and another for sampler states which are supported in function nodes and custom expression nodes
      • Texture Array node as been deprecated in favor of the regular 'Sampler' node which now supports texture arrays and works inside shader functions
      • 'Parallax Occlusion Mapping' node and 'Triplanar Sample' node now automatically detect if the input is a texture array and no longer use a toggle to turn ON the support
      • Made property panel option labels flexible to the width of the panel
    • Fixes:
      • Fixed leak in the automatic template importer
      • Template importer now properly skips non-shaders files when checking for changes
      • Fixed issue with properties in fetch mode not loading correctly and making some property names hostage
      • Fixed issue with UVs generation in specific situations where it would create variables with the same name
      • Fixed issue with assembly definition files where nodes outside of the assembly would fail to load
      • Fixed issue of emission channel not working in HDRP decal template
      • Fixed issue with URP 2D templates accessing the wrong uv set
      • Fixed Bitangent calculation in SRP which wasn't taking tangent sign into account
      • Fixed issue with 'show and compile' button in shader inspector in unity 2020.1
      • Fixed issues over 'Substance Sample' node
        • Fixed compilation error on Unity 2018 and above
        • Fixed normal texture port detection on Unity 2018 and above
     
    Mauri and florianalexandru05 like this.
  32. Zenneth

    Zenneth

    Joined:
    Nov 7, 2012
    Posts:
    5
    Hi, I'm using Unity 2019.4.2f1.
    I created Post Processing Stack via Amplify, and it worked perfectly in the Editor.

    However, when I Built it, the Shader became invalid.

    I tried removing the PostProcess Stack, then the error no longer appeared,
    so I'm pretty sure it's the Shader from PostProcessing Stack.

    Can you help me to solve this issue?
     

    Attached Files:

    laurentlavigne likes this.
  33. MACHIN3

    MACHIN3

    Joined:
    May 25, 2016
    Posts:
    61
    I'm having some issues with the decal shader, in particular with mesh decals and the Albedo Alpha. When I connect my alpha map to the Alpha Albedo input, the decal becomes fully transparent:

    With Alpha Albedo connected the mesh decals to the right are fully transparent, while the projector decal to the left displays fine.



    With Alpha Albedo disconnected, both decals work fine, but are fully opaque obviously.


    Here's the above example. Drop it into an HDRP example scene.

    I haven't gotten around to testing maps for the other inputs. But could it be, that the ASE decal shader doesn't support the decal mesh's UVs?

    Building the same shader in shader graph works as you'd expected.

    Reproduced in Unity 2019.4.6f1 and 2020.1.0f1, Ubuntu 18.04.

    FWIW, mesh decals are a pretty popular workflow among hard surface artists, that allows you to conveniently add decals in the 3d app of your choice. Compared to that projectors in Unity are fairly limited in application (no complex panel decals) and can get pretty painful to setup in terms of positioning and setting up the atlas coords.
     

    Attached Files:

    Last edited: Aug 9, 2020
    laurentlavigne likes this.
  34. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    Great Shader editor, gave a 5/5 rating!
    I made my version of the standard shader and added the snow on top, ofc there will be much work. Could anyone give me a hint on how to add a proper slider to the metalness? It doesn't seem to look quite right?!
     

    Attached Files:

  35. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    3,827
    Anyone using VDM? How do you author?
     
  36. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    521
    Does new sampler state node compatible with HDRP templates?
     
  37. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Thanks for bringing this to our attention. Based on what we were looking into, the decals were specifically for the projector. Not sure if this is a recent addition to their decal system but our developers will tackle it as soon as possible; I don't see why it wouldn't be possible if this is something Unity allows for.

    We'll let you know as soon as we have any developments.

    Hey there,

    Try this: Including Shaders on Build


    Thanks, happy to hear it!

    What do you have on your side?

    Mudbox seems to be the quickest/painless way to get it working with Unity; plus you can also get the normal based on your subdivision levels.



    Additional details here: VDM in realtime.


    It should, any issues?
     
  38. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    521
    It is showing me warning on SS node, even "use sampling macros" is enabled. Am I missing something?
     
  39. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Might be a UI thing, if you turn it off and on again it seems to disappear; reopening a saved shader does so as well. I've passed this on to our developers for confirmation, I'll get back to you asap.
     
  40. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    521
    Thank you!
     
  41. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    99
    Are you planning to support Streaming Virtual Texture feature available in Unity 2020.1/HDRP 9.0 preview package?
    And if so, are you planning to support virtual texture sampling in combination with the parallax nodes - which is currently not supported by Shader Graph...?
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Yes, we're definitely planning to support it, we've been waiting to see this integration for a while.

    Can't know for sure if we're going to be able to allow it to be used with the Parallax nodes, it really depends on the actual Virtual Texture capabilities; we'll have to see when we get a chance to experiment with it.
     
    ChezDoodles likes this.
  43. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    Here, I'm trying to add sliders like in the standard shader but Idk if I'm doing it right wit the blending modes. So far everything works aside from one thing. On Ambient occlusion, I used "power" and added 0,1,1 values and it seems to work but for some reason, the metalness doesn't look right when I add it from a slider, looks different from the standard shader on the slider, the textures work tow. My next step If I get this to work I'll try to make better snow somehow. Is there something I'm missing or did wrong?
     

    Attached Files:

  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Hey there!

    It's actually just a Multiply on all of them; Metallic, Smoothness, and Occlusion, or any other values such as the Specular color.

    One thing, is there a particular reason for the Texture Sample node use or are you just trying it out? I noticed that you're using 4 different texture sample nodes but you're pulling a single channel from each; you should use a single texture sample node and pull from that; you can fit those four in a RGBA using a single file.

    What seems to be the issue with the Metallic channel? It should be exactly the same as the Standard Surface shader.
     
    florianalexandru05 likes this.
  45. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,214
    Yeah, I was trying it out really fast, I'm aware of the fact I can make a single texture and input the RGB for each, I was about to do that later, thanks for reminding me I was about to forget lol. I took another look at the metalness and it's working just fine, I didn't see it at first, my bad! Thanks for the help, I'll use multiply then, great tool! :D
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849

    No problem, just checking! Glad to know the metallic is working well.
     
    florianalexandru05 likes this.
  47. ChezDoodles

    ChezDoodles

    Joined:
    Sep 13, 2007
    Posts:
    99
    Hm... I want to optimize a couple of my ASE Universal/PBR shaders by moving some UV calculations from the frag to the vertex part of the shader. Is it possible?
     
  48. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    It should be possible with the Vertex to Fragment node.
     
  49. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155
    Hello Everyone!
    I am currently trying to make an alpha cutout shader with the universal render pipeline, however, unlike in @Amplify_Ricardo 's example, I don't have the toggle for the alpha clipping.
    Does anyone knows what's going on?
    upload_2020-8-17_11-46-48.png
     
  50. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    1,849
    Hey, which example?

    Use this: upload_2020-8-17_11-25-46.png
     
unityunity