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. atmuc

    atmuc

    Joined:
    Feb 28, 2011
    Posts:
    1,166
    I want to create a shader similar to that link;

    https://docs.unity3d.com/Packages/com.unity.render-pipelines.universal@12.1/manual/renderer-features/how-to-fullscreen-blit-in-xr-spi.html

    T
    exture sample node in ASE creates SAMPLE_TEXTURE2D_ARRAY. I need SAMPLE_TEXTURE2D_X.

    I need TEXTURE2D_X too.
     
  2. ccjay

    ccjay

    Joined:
    Mar 24, 2014
    Posts:
    20
    I decided to fire up Shader Graph for the first time today.. Unfortunate.
    ASE has always been my favorite tool, has a superior UI IMO - but it's becoming more and more unusable in SRP land.

    If I fire this thing up in HDRP I'm just barraged with errors. It can't support SSS material types for what seems like a very silly reason and 95% of the HDRP examples are all broken.

    Am I missing something / doing something stupid - or is this tool just sort of abandoned?
     
  3. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Seems to be working as expected on the shader side. Does seem to be something specific to the normal texture used, try any other normals included or convert your normal from grayscale on the texture you shared. How did you create it?

    upload_2022-7-20_19-15-57.png

    I'm afraid XR is really not our jam, if this is not being provided by the regular URP Template(which you can edit), you can use a Custom Expression node to access whatever data Unity allows for; or a Texture Sample node set to Global to access Unity created textures such Gbuffer passes.

    That's a bit of an exaggeration, it's not getting "more unusable", it's simply lacking an update for the latest HDRP/URP versions. (which we are working on) Rest assured, they are coming.

    However, the SSS issue is known, I'm a bit confused to what you mean by 95% percent of the HDRP examples being broken. What HDRP version are you actually using?

    Last officially supported version is 12.x(but does need to be updated due to recent changes); SRP 13.x coming soon after.

    And of course this tool is not abandoned, there's a lot more community activity on Discord: https://discord.gg/zVdqVSp
     
  4. ccjay

    ccjay

    Joined:
    Mar 24, 2014
    Posts:
    20
    That's good to hear I suppose.
    If you try to leverage the latest version of HDRP which is the default for 2021 LTS - almost all the examples bundled will break. All with different errors.

    I understand the last release was January but that's a pretty long return time isn't it? This is the tool I've recommended most to so many people because of how amazingly it supported forward Compatibility.. ASE was an auto-fix for shaders packaged by other creators who had stopped supporting / updating them. I couldn't sing the praises of this tool more for the last several years. Even the UI and nodes were far more readable to me than Shader Graph.

    It's sad to see I can barely use it for many of the use cases I need it for now. :(
     
  5. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    19
    I got the reply from Unity Tech team (JP).
    If you want to make Toonshader with deferred renderer that will be very difficult.
    You need change a lots of core lighting process.
    Currently there is no any sample made with Shader Graph Unlit in deferred renderer. so you need make it by self
     
  6. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    That does not sound right, can you please show us the errors? (console log screenshot)

    Are we talking Amplify Shader Editor or the Shader Pack samples?

    For the record, confirmed it with the latest 2021 and the only error present with the included samples was the "OutSSSBuffer" affecting SSS shader types, everything else worked as expected. (not to say an update is not required, but for the most part)

    The way you're putting this forward makes it sound that you're not going to be able to continue using ASE in the future to update shaders, which is not the case at all. Anyway, language can be a barrier, rest assured we have people working on this.

    And yes, the last release was on January 31st.

    This year we're a bit shorthanded so it's taking a bit longer; life happens, covid happens. No need for this negativity. I understand this is not ideal but let's not paint the situation that grim. Just because the latest SRP version as a few issues that require an update on our side that doesn't mean ASE is any less, nor does it signal its end, let's not conflate things.

    Soon you'll be able to continue using it as you always did.

    Our apologies for the inconvenience.


    "It's sad to see I can barely use it for many of the use cases I need it for now. :("

    I would like to know some specifics.


    Yeah, Custom Lighting is forward only.
     
    Luke-kaser likes this.
  7. XiongmaoHZH

    XiongmaoHZH

    Joined:
    Dec 21, 2021
    Posts:
    8
    hello Amplify How can I do this in ASE?
     

    Attached Files:

  8. XiongmaoHZH

    XiongmaoHZH

    Joined:
    Dec 21, 2021
    Posts:
    8
    hello hou can i get this kind of outline in Amplify , it looks like an application of depth ,I just want it to appear where it intersects the skybox,I have an error in my project so I happen to see this effect,But I don't know how to get this mask in Amplify。
     

    Attached Files:

  9. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    When making a shader using _MainTex as a property, I get this unity importer error.

    Property (_MainTex) already exists. Use SetTexture instead.

    How can I get around this? All I am trying to do is replicate a Standard shader with some extra features. (So I need a _MainTex)
     
  10. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Check the Toon/Custom Lighting samples for N.L and Outline examples.

    The Amplify Shader Pack is free for ASE users.

    That's the editor telling you that _MainTex is already present in the Shader Template you're using; the solution depends on what exactly you're trying to do and which shader type you're using.
     
  11. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    Hi thanks, I'm not using a shader template, just the Standard shader setup. There's only one shader template available to me and that's from memory I think an unlit template. How would I use _MainTex as my main texture if I'm not using a Shader template?
     
  12. ethanicus

    ethanicus

    Joined:
    Aug 24, 2015
    Posts:
    40
    That's very weird. I downloaded the normal map from Polyhaven I believe. Isn't the Grayscale button only meant for bumpmaps rather than normal maps?
     
  13. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Yes, but what shader type(Left Tab) are you using when you get that error?

    Well, not quite, it just means that Unity tries to create a normal map from a regular image intensity(or grayscale). It's not ideal of course, not too used I'd say.
     
  14. Darren-R

    Darren-R

    Joined:
    Feb 11, 2014
    Posts:
    66
    I am using
    Shader Type: Surface
    Light Model: Standard
    Shader model: 3.0
     
  15. bennes4

    bennes4

    Joined:
    Jan 22, 2013
    Posts:
    6
    Hi, i just simply want to use unity decal projector, use it on trasparent surface, but when i switch to Amplify shader decal, the option ''affect transparent" is missing, how do i fix this ? Affect Transparent.jpg
     
  16. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,813
    Edit: I'm having a strange problem with the hair shader, I have no idea why. It looks fine in the editor but in play mode, half the faces disappear. (Unity 2020.3.0f1 LTS) I'm using it on grass and trees and have vertex offset for leaf animation. I was just trying it out since I'm rather disappointed with the fact I can't edit specular fresnel in HDRP. I'm using custom normals for the foliage so I want to edit the fresnel as I did with built-in which gave me great results. The problem is I can't use any light direction nodes in HDRP. I guess what I'm trying to ask is, is there an easy way to only affect the specular of the mesh without editing the mesh normals? Is there something I could do?
     
    Last edited: Jul 30, 2022
  17. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,813
    Since I'm using custom mesh normals it would be awesome if I could use a fresnel with the "view vector set to light direction" but maybe there's something else I'm missing in HDRP. Also, I know I asked this before but is it not possible to have light attenuation as well?
     
  18. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    How do I add a shadow caster pass to an HDRP shader to be able to use the light attenuation node?

    Also I'm still getting the sunlight and even reflections even though I set all material properties to 0. How can I get rid of this lighting?

    upload_2022-8-1_12-43-38.png
     
    Last edited: Aug 1, 2022
  19. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    Please send your shader with the error present to support@amplify.pt.

    That's on the latest HDRP? Likely missing an update on our side.

    Sadly HDRP does not allow you to access light data in ASE as with URP and Built-in render. You can however pass any values you might need to your shader using a dedicated script and use that to manipulate the final result of whatever you might need.

    No Custom Lighting nodes in HDRP; this is a hard limitation.

    Well it depends on what's causing it, might be possible to disable a few Unity Keywords using a Static Switch, not sure when it comes to HDRP.
     
  20. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Thanks.

    Is it possible to use depth offset with a texture for earlier Unity versions with the standard 3d template which don't use any new scriptable pipelines like HDRP or URP?
     
    Last edited: Aug 4, 2022
  21. DanijelM

    DanijelM

    Joined:
    Dec 20, 2017
    Posts:
    20
    Is there perhaps a deferred URP version of the custom ASE terrain shader?

    Hi all! I'm wondering if anyone can assist? I'm hitting a brick wall on this.

    My goal is to "upgrade" the custom terrain shader available in the Amplify Shader Pack (fully up-to-date) to:
    1) work in URP deferred
    2) work with stencil masking

    The problems so far are numerous
    A) The splats are going off randomly. I suspect the additional passes aren't working as intended. It's almost like the splat used is chosen randomly (whether it's the base one or the added). Not sure on this though. What I am sure about is the result and that changes almost every time I compile the shader.
    B) The stencil masking isn't working, but I haven't even reached that part in any detail yet.

    So far, I've followed the docs laid out on the Amplify wiki, although as I've said, I'm basically editing Amplify's terrain shader. I've also added the tag noted by Unity.

    Not sure if it's ok to go adding shaders here (as I said, they're not mine...), so I'll refrain from doing so.

    Is there an even newer version of the shader to be found somewhere?
     
  22. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    I'm afraid we have nothing for it other than the Offset parameter on the Shader properties on the left. You could always look into custom templates for vert/frag.


    That's an interesting question, I'm not sure our URP samples have been extensively tested with the recent URP Deferred Renderer. Which Unity and URP version are you using? We'll run a few tests on our end and see what we can do.
     
  23. DanijelM

    DanijelM

    Joined:
    Dec 20, 2017
    Posts:
    20
    I've pushed both the editor and URP to the latest to make sure that isn't the issue. The editor is 2022.1.11f, while the URP is 13.1.8. The Amplify Shader Pack says it's up-to-date as well.

    If you want, I can send over the "modified" shader. Just let me know where to, please.

    Thank you!
     
  24. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hey, thanks for the quick reply. URP 13.x is not officially supported yet, we're working on the next SRP updates. That could be it but we will double check just in case and test on the latest 12.x using Deferred rendering.

    If you can to share additional info or files please use the official email at support@amplify.pt.

    Thanks!
     
  25. DanijelM

    DanijelM

    Joined:
    Dec 20, 2017
    Posts:
    20
    OK. I'll send over what I have.

    Thank you!
     
  26. tsupra88

    tsupra88

    Joined:
    Dec 15, 2019
    Posts:
    6
    @ Amplify_Support
    There seems to be an issue with ASE when using URP 10.9+ (URP 10.10 also has the issue) where ASE appears to import a template that tries to include the DBuffer.hlsl file from the URP Packages. This causes a shader compile issue. It does not occur in a project with URP10.8.1 where ASE is imported as it seems to use a different template. I tried out URP12.1.7 in Unity 2021.3.6 and there were no issues either. For some reason, it looks like a URP12 template is being applied when using URP10.9+, which causes the attempt to include the Deferred Buffer and decals related files.

    Steps to reproduce:
    ASE Version used: 1.8.9.035 (latest version available as of posting time)
    Affected Scope: URP10.9+ (10.9 & 10.10)
    Unaffected: URP10.8.1 (does not show as available in Unity 2020.3.37f1 package manager, but is available in Unity 2020.3.33f1 package manager)
    Severity: Prevents shaders from compiling if attempting to save out the ASE shader from the node window. If shader was generated in URP10.8.1 with ASE node window and is imported into URP10.9 with regeneration of the shader code, the issue does not occur.

    1) Install Unity 2020.3.37 with URP10.9+ (or any version that has URP10.9+)

    2) install ASE (tested on v1.8.9.035 of Amplify Shader Editor, which is the latest).

    3) Open up an ASE canvas via Window > Amplify Shader Editor > Open Canvas

    4) Note the console errors that will occur on the shader.

    5) Exit from the canvas and then create a new ASE Universal PBR shader. Note the 2 errors regarding the URP package DBuffer.HLSL file not found. This causes a shader error to occur.

    6) Appears that URP10.9+ installed to a Unity project will cause ASE templates for URP12 to install since the shader code appears to make mention of a DBuffer and decals which are URP12 features. Installing ASE with URP10.8.1 (Unity 2020.3.33f1) does not cause this issue.

    7) Commenting those includes and portions of shader code from the template appears to fix or at least seems to get the shader to compile.
     
  27. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Thanks for reporting, please do not attempt to correct code before reporting and confirming the issue.

    There's a known problem where the wrong Template might be imported automatically. To correct, first disable the Auto Import in Preferences > Amplify Shader Editor.



    Proceed to remove the previously imported templates files and import the latest 10.x package. (all in the template folder)
     
  28. tsupra88

    tsupra88

    Joined:
    Dec 15, 2019
    Posts:
    6
    Found it. The 'USRPTemplates 10xx - 11xx (Legacy).unitypackage' file appears to be the one to use. After setting the Preferences auto-import template option toggle off, removing the 'Assets/AmplifyShaderEditor/Plugins/EditorResources/Templates/Universal' directory, then importing the USRPTemplates 10xx - 11xx (Legacy).unitypackage' file, then opening the ASE shader and re-saving it, the shader works fine again in Unity URP10.9.

    Thanks!:)
     
    Amplify_Support likes this.
  29. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Happy to hear it, sorry for the inconvenience, this will be addressed in the next update.
     
  30. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Is there a way to project a texture using the sun light direction? I can use the worldspace positions to project things but when I try light direction nodes they get wonky and skew alot.
     
    Last edited: Aug 11, 2022
  31. my_little_kafka

    my_little_kafka

    Joined:
    Feb 6, 2014
    Posts:
    87
    Is it possible to expose surface parameters (like Two Sided parameter) for shader in ASE (it became possible with ShaderGraph recently) for URP?

    There's this in the manual, but it doesn't work for URP.

    I checked everywhere and couldn't find it (maybe I need to add a specific pragma command?), and it feels counterproductive to dublicate shaders where the only difference is the culling method.
     
  32. marcinpiotrowski

    marcinpiotrowski

    Joined:
    Jan 10, 2021
    Posts:
    3
    Is there a way to check if Texture (as parameter) has been set? I want to blend 2 textures but only if second (Pink) texture is set. For now I added Static Switch, which I manually turn ON when Pink texture is set.

    Also why in Blend Operations node there is no "Overwrite" type? I know, that I can just use Lerp, but it's strange for me, that it is not listed in dropdown.


    upload_2022-8-11_12-38-21.png
     
  33. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Sorry, not something I've tried. Perhaps its best to pass values to the shader directly using a script.

    Ok, one thing is adding those options to the default shader has URP does now; this was not always the case, we will add them(as we have in HDRP) in a future uptate.

    The other is using inline properties in URP, that should be working. Did you set that float note to Auto-Register?




    No, you can check for the Default value on the Texture Sample node(white by default) with a logical operator or a dot product(check the UV Light Reveal Example). There's always a default assigned, this is Unity specific. Script usage is also common for this to avoid the extra operator.

    What do you mean by "Overwrite", how would this work with the Blend Node? Sounds like a lerp is the way to go, or a Toggle Switch.
     
    Last edited: Aug 11, 2022
  34. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Ignore my previous reply, I think I know what you mean now. Scroll down, this is due for an update.

    upload_2022-8-11_19-55-30.png

    Renderer differences have been a pain, hopefully we're converging at some point; on Unity's side and ours by proxy.
     
    my_little_kafka likes this.
  35. marcinpiotrowski

    marcinpiotrowski

    Joined:
    Jan 10, 2021
    Posts:
    3
    Thanks for the default texture checking idea, I'll give it a try.

    Overwrite is standard Blend operation in Unity Shader Graph. I was just surprised it's not in Blend node in ASE, but yes, it can be done by simple lerp, so not a big deal.

    upload_2022-8-11_21-28-29.png
     
  36. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Cool, I see.

    In this particular case our node came first and it was based on Photoshop blend modes. Might be an addition for later for parity sake, thanks for mentioning it.

    In any case, like you said, it's a simple Lerp. Also of note, most of those nodes can be recreated in a Custom Expression node since Shader Graph includes code examples.
     
    marcinpiotrowski likes this.
  37. my_little_kafka

    my_little_kafka

    Joined:
    Feb 6, 2014
    Posts:
    87
    Oh, thank you! So that's where it was hiding
     
  38. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
    Tried to find the 3D Texture sample node but couldn't. Isn't there one? Trying to use it to create shaders from a generated force grid.
     
  39. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
  40. Zilk

    Zilk

    Joined:
    May 10, 2014
    Posts:
    333
  41. XiongmaoHZH

    XiongmaoHZH

    Joined:
    Dec 21, 2021
    Posts:
    8
  42. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    You need a Custom Lighting shader. Works a bit different in URP but you can learn more about it on our past streams.



    Note that the old videos used "Lightweight RP"(discontinued) but you can use URP Types instead, it's the same thing.
     
  43. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,813
    Hello again, I'm making my trees with custom vertex normals like this, and I have a problem I can't fix.
    CN_01.png

    I spend some time figuring out how this works to no avail but I would like to have correct tangents on the normal maps with custom mesh normals, or vertex normals. Since I first used this method to shade foliage I noticed some faces shade incorrectly as the shadow and light are facing the wrong way on the normal maps. This is not a problem caused by backfaces but the custom vertex normals messing up the normal map vectors.
    C5.png

    The custom normals make for very beautiful soft shading on my trees but the normals maps are wrong no matter what corrections I do. I noticed this on all Unity models with custom normals, even on the vegetation engine and others.
    Wrong1.png Wrong2.png

    I see there's a vertex tangent input in the HDRP version of amplifying and I tried baking a texture and plugging it in and it seems to work, the tangents on the normal map get fixed. However, I would like to know if there's any way to recalculate only the tangents of the mesh through nodes instead of texture without affecting the custom vertex normals and then plugging it in the vertex tangent input.

    V tangents.jpg

    My second question is, can vertex tangents be edited like this in the build-in and URP pipeline? I don't see a vertex tangent input. If not my third question is, can amplify read from a second vertex color layer, or is it only limited to one, I noticed you can store multiple vertex layers in Blender.
     
  44. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hey,

    Here's the ASE stream on Normal Reconstruction.


    Regarding URP, we're doing things a differently on our side. Ours does things in a bit more performant manner but we hide that in the template, however I recommend checking the URP Tangent To World Normal Shader Function node. (double click to view its source)

    Objects only have 1 set of vertex color that Unity accesses, anything else needs to be stored on UV's.
     
    florianalexandru05 likes this.
  45. akuparagames

    akuparagames

    Joined:
    Jul 20, 2017
    Posts:
    9
    Hello,

    We're encountering an issue with one of our shaders made in Amplify. Currently it looks correct on every platform except Xbox. There we get this more metallic looking texture.
    Shader_PC.png Shader_Xbox.png
    This is what our shader looks like within Amplify. Is there any reason this shouldn't be working on Xbox?
    Screenshot_49.png

    Thank you
     
  46. akuparagames

    akuparagames

    Joined:
    Jul 20, 2017
    Posts:
    9
    After further investigation, it seems that the Face Node is returning a 0 value instead of the intended -1 or 1
     
  47. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,813
    I don't know how to store vertex colors in UV but at this point, it's not needed anymore.

    Thanks, that actually helped, about 90% of the problem is fixed. I used the TBN calculations to edit my normal map. I managed to fix the X and Z axis but I'm missing the up Y channel and I don't know how to properly merge them into the normal. At least it got rid of the upside-down shadows on the normal map which I'm happy about. I can't reconstruct the normal map from height like in the tutorial because I want to use the actual normal map and I think those other solutions edit the vertex normals which isn't what I want to do. Anyway, I'll take another look at the video, I don't fully understand what I'm doing but I'll post my solution here later.
     
  48. jStinson

    jStinson

    Joined:
    May 9, 2017
    Posts:
    21
    Hello,


    I’m working on a toon project that uses a combination of real-time and baked shadows. Here is a simplified version of the shader:



    2021.3.0, Built-In render pipeline… The scene below has a single mixed directional light. The sphere is the only object with real-time light and shadow, everything else is baked. Everything turns dark when the sphere leaves the screen. This also happens if the camera rotates/FOV changes so that the sphere and its shadow are no longer on screen. I’ve isolated the Light Attenuation node as the issue.



    The work around is to have two directional lights, one set to baked and the other to real-time, but this makes scene management a bit messy (doing things like disabling shadow casting on objects using baked shadows so they aren’t doubled up).

    My guess is this is just how it works (no real-time light attenuation data if all objects receiving real-time leave the screen?). That said, figured I’d post here just in case there’s another solution/workaround I’m overlooking (or if it’s a bug with the Light Attenuation node in Amplify).

    I have a small repro project ready if that would be helpful. Thanks for any help you can provide!
     
  49. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Yes, repo project would be great. Please send it to support@amplify.pt.
     
  50. marcrem

    marcrem

    Joined:
    Oct 13, 2016
    Posts:
    340
    Hi,

    We have a shader for our clouds that is doing displacement on various levels.
    We were using Unity 2019 LTS with URP being only available with forward rendering.

    Recently, we upgraded to 2021 LTS, and switched to deferred. After upgrading our shader, a new slider appeared on our material: Render queue.

    Now there seems to be a bug. After upgrading the material to the proper version (automatically by opening the shader editor on the shader), here's how the cloud looks like:
    upload_2022-9-4_13-34-10.png

    It doesn't look right. now if I set the render queue above 2500 (so 2501 here), suddently all my effects are working again:
    upload_2022-9-4_13-34-55.png

    Problem is, when setting it to above 2500, it messes all rendering order with other stuff like my rain that's suddently visible through clouds:
    upload_2022-9-4_13-36-2.png

    although it should be hidden by the mesh like here when I put render queue back to its original value:
    upload_2022-9-4_13-36-43.png

    Why is the displacement not working unless changing the render queue? How do I fix that?

    Thank you.