Search Unity

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

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

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

  1. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there!

    That depends, we'd need to see an example to be sure of what's happening on the compiled code. I think this is one of those cases where the compiler will indeed handle it; the Static Switch is the ideal way to do this. If you have a specific example in mind, please contact us via support@amplify.pt and one of our developers will give it an in-depth examination.

    Alternatively, you can look into creating your own shader templates; not exactly the same but you do have full control.
     
  2. Luke-kaser

    Luke-kaser

    Joined:
    Apr 2, 2018
    Posts:
    19
    Thank you for your detailed reply. very helpful !
    ASE is the best shader editor !
     
    Amplify_Ricardo likes this.
  3. Filto

    Filto

    Joined:
    Mar 15, 2009
    Posts:
    713
    Hi!

    I am trying to to create a post process fog using the post process stack functionality ASE.

    How can I pass the depth data to the post process effect that I can get from a camera depth fade or similar?

    Edit: Solved this by adding the following to the Template and accessing through Template parameter node

    #if UNITY_VERSION >= 560
    UNITY_DECLARE_DEPTH_TEXTURE(_CameraDepthTexture);
    #else
    uniform sampler2D_float _CameraDepthTexture;
    #endif
     
    Last edited: Oct 25, 2021
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    Hey, you should be able to access the Depth texture using a Texture Sample node set to Global.



    Alternatively, you can also access Gbuffer textures.



    This is automatic in Deferred Rendering but be sure that Unity is generating the required Depth texture by using the script referenced here: https://forum.unity.com/threads/enable-depth-texture-for-editor-camera.319097/#post-3167542

    Hope it helps!
     
    Squize likes this.
  5. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Good news!

    Now that the Unity 2021.2 is official and urp 12 release as well, can we expect Amplify shader editor to support it as well? I am interested in 2drenerer support.

    1. Need to be able to convert existing 2021.1 version shader into 2021.2 so they can be reopened.

    2. Support for custom lit mode.

    3. Work with vfx graph?
     
    mGMM likes this.
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    Good news indeed, we can finally complete those template updates! Lot's of new stuff coming, including a new Decal URP shader type.

    We're tackling URP first, we'll get back to you as soon as we have any developments.

    Regarding VFX Graph, we can't actually support that at the moment regardless of SRP version.
     
    mGMM and castor76 like this.
  7. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387



    180+ Samples for HDRP, URP, and BiRP
    FREE
    for all Amplify Shader Editor users!

    We're separating ASE samples from the main package. It's always been a struggle to keep multiple versions or to include higher resolution content. This way we can now offer more samples, models, higher resolution textures on future samples and better demo scenes. It's completely FREE to all ASE owners, just checkout at no cost. (be sure to be on the account that owns ASE) You can also pick it up on our site once you redeem it via the Asset Store: http://amplify.pt/download

    You may already know most of these shaders but now you have Built-in, URP and HDRP versions.

    This will eventually become easier to import once listed on the Package Manager; more on that at a later stage.

    Learn more: Asset Store
     
  8. mxbrunner

    mxbrunner

    Joined:
    Sep 30, 2016
    Posts:
    4
    Hi, not sure if this is the best place to put a feature request, but can whitespace tolerance for shader templates maybe get enhanced?

    In particular, I noticed that for the /*ase_subshader_options...*/ block, each attribute needs to be placed in a separate line, and more importantly, that each line may only be indented with leading tabs, but not spaces, so the option actually appear for shaders that use the template.

    At my workplace, we conventionally make our IDEs put spaces instead of tabs, which I feel like is the general standard for developers? I might be biased.

    Anyway, it's really frustrating when I use my IDE to format my shader template and it breaks it because it is so sensible to whitespace character changes. Especially because it usually break silently :)
     
  9. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,792
    I made a fake translucency shader following a tutorial and I noticed only directional lighting works, not point lights. Is there a way to add point lights to affect the fake translucency? In the tutorial, it seemed like point lights were affecting it but it doesn't for me. I'm using Unity Unity 2020.1.3f1.
     

    Attached Files:

  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, I'll pass it on to the devs.

    We do believe Tabs are the preferred method for good indentation, that part will likely not change. Based on our experience with external teams and projects, this is the most common option.
     
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, I'm not fully familiar with this example but you might need to use the Custom Lighting mode in order to properly access additional lighting info. (Light, Light Attenuation)
     
  12. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,792
    Thanks for the quick reply, unfortunately, I won't be using Custom Lighting since I heard it only works in forward from what I understand, I'm making deferred only shaders.

    Edit: This is the tutorial I used

     
  13. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Ah yes, Forward only, but that's the only way to access the required additional lighting data. Perhaps you can build an alternative based on position and range of lights? (scripting)

    That Blinn-Phong Light node is using a few extra nodes, double click to open it. (the node used in the video)
     
    florianalexandru05 likes this.
  14. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,792
    Problem is, they only work in forward, for stuff like grass this is a bit too detrimental so I decided to live with the limitations. ;) Performance is also important when I'm making shaders for Standard and URP, for HDRP I'll go all out thou.
     
    Amplify_Ricardo likes this.
  15. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Hello.

    I'm using flipbook animation UVs for a caustic and normalmap texture to create a water scene. I can tile the same frame using a frac world position but I get these seams. Is there any way to fix of them?

     
  16. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Also is there a shader template for custom lighting that works identical to the standard shader?(normal unity shaders, not the new pipeline ones) I made almost the same standard shader but the specular roughness doesn't work so well.
     
  17. Sam0waR

    Sam0waR

    Joined:
    Nov 30, 2015
    Posts:
    26
    Please remove extra white-space from StickyNoteNode file name "Plugins/Editor/Nodes/StickyNoteNode .cs"
     
    trashkevv likes this.
  18. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    The problem relates to its Mips, perhaps this thread might help: https://forum.unity.com/threads/til...shader-getting-artifacts.535793/#post-3529864

    You can set the Texture Sample node Mip parameter to "Derivatives".

    You have the Legacy Lit template that mimics the default BiRP material. You also have the Surface Standard Light node for Custom Lighting shaders.

    Thanks for the heads-up, we'll take care of it in the next update.
     
    Cactus_on_Fire likes this.
  19. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    That's a nice node, although I have to set up the lighting channels separately. What is the correct way to add indirect specular and specular channels what can change smoothness value with a slider?
     
  20. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Not sure which shader type you're referring to but you need to edit actual template for something like that with the Legacy Lit. I hope I didn't misinterpret your previous question, just to elaborate, you need a Custom Lighting shader for that type of manipulation on the graph.
     
  21. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Yeah, I'm using custom lighting template but I need to plug all the lighting channels like diffuse, speculars, indirect lighting separately so I can have underwater caustics that is multiplied by the light attenuation. Then I need to plug the rest of the lighting channels to have an accurate lighting setup like the standard material.
     
  22. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Got it, in that case it's not possible with that node.

    We do have one user in our Discord that has been trying to replicate PBR behavior on a fully configurable Custom Lighting shader, source included.

    https://discord.com/channels/461534117297913866/563734455269982219/902537002317119539
     
    Cactus_on_Fire likes this.
  23. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Having deadline till end of this month, I feel a bit worried about how long this would take.. any idea? So I can come up with plans?
     
  24. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    We'll do our best to have this quick. However, we have been very clear in saying that we had no ETA, it's very risky to assume a deadline without an exact availability date which we did not guarantee.

    That said, we have taken on URP and 2D related shaders first. Unfortunately, we've already it a small snag on the 2D Custom Lit for which we had to contact the Unity URP team for additional clarification. Depending on how long it takes to resolve these issues, a couple of days can turn into a week.

    In any case, let me see If I can get you early access to some of the 2D URP work already done; no promises, I'll PM you directly.
     
  25. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Wonderful, thanks for your effort! I too, have some indication on how it works, cause I was in conversation with Unity about it so please check this thread if you like.

    https://forum.unity.com/threads/cur...ing-core-features.1023772/page-3#post-7603765
     
  26. sportique

    sportique

    Joined:
    May 27, 2013
    Posts:
    8
    Are there any tutorials/examples for post processing effects?
    I'm using the post processing template and the post processing stack tool but everything I do just results in
    a small black triangle appearing in the middle of the screen
     
  27. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there! Just the samples for now.

    Which Unity version and renderer are you using? Do our included samples work as expected even after you save them?
     
  28. sportique

    sportique

    Joined:
    May 27, 2013
    Posts:
    8
    hi, thanks for the reply.
    I'm using 2019.4.17f1 with the built in/standard renderer and V2 PPS.

    where can I find the samples? I can see samples for regular shaders (which work fine) but nothing related to post processing.

    thanks
     
  29. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Thanks for the additional details, what shader type are you using? (screenshot would be great) The issue you're describing is usually caused by using the wrong shader type, best to confirm.

    The PPS sample is located under Built-in \ Mosaic Effect PPS.
     
  30. sportique

    sportique

    Joined:
    May 27, 2013
    Posts:
    8
    Fantastic! the Mosaic effect works perfectly!
    when I finish work this evening I will go through the Mosaic shader settings to figure out what I've been doing wrong.
    thanks again!
     
  31. MagicCancel

    MagicCancel

    Joined:
    Jul 30, 2015
    Posts:
    25
    Hello, I recently updated my project from 2019 to 2021 Unity, and am getting some errors:

    Assets\AmplifyShaderEditor\Plugins\Editor\Nodes\SRP\HD\ASEDiffusionProfile.cs(7,29): error CS0234: The type or namespace name 'HighDefinition' does not exist in the namespace 'UnityEngine.Rendering' (are you missing an assembly reference?)

    Assets\AmplifyShaderEditor\Plugins\Editor\Nodes\SRP\HD\DiffusionProfileNode.cs(25,11): error CS0246: The type or namespace name 'DiffusionProfileSettings' could not be found (are you missing a using directive or an assembly reference?)

    Anyone know what's going on with that?
     
  32. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there!

    Did you also update ASE?

    Please confirm your current version under Window > Amplify Shader Editor > About.
     
  33. MagicCancel

    MagicCancel

    Joined:
    Jul 30, 2015
    Posts:
    25
    I think so, in the package manager I see Version 1.8.9.021
    Amplify shader editor does not appear in the windows tab.
     
  34. zackblack

    zackblack

    Joined:
    May 17, 2015
    Posts:
    76
    How do I get the Tiling and Offset values from the Texture Object node so I can manipulate them and feed those values back into the Texture Coordinates node? If I just connect the Tex ouput/input, I am unable to make adjustments to the values.
    upload_2021-11-8_15-22-22.png
     
  35. Sam0waR

    Sam0waR

    Joined:
    Nov 30, 2015
    Posts:
    26
    Is there any way to create material property toggle/keyword to switch ASE shader blend modes, i.e. between "Blend Off" and "Blend SrcAlpha OneMinusSrcAlpha"
     
  36. LCGC_2

    LCGC_2

    Joined:
    Jan 13, 2018
    Posts:
    1
    Hi all,

    We have a strange issue using ASE unlit shader in combination with URP. Please checkout the animated gif.

    When we compile the shader, it turns invisible and throws an error. As you can see, all we did is set the color to white, and that doesn't even work. I think its because the the template appears to have an error. Does anyone else have this issue?

    We are using:
    - Latest version of Amplify Shader editor, downloaded this morning
    - Unity 2021.2.0f1
    - URP version 12.1.0

    Please help us fix this as we don't want to go back to Shadergraph for this :)
     

    Attached Files:

  37. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    That means that something is preventing it from executing, it could be our script but it could also be something else in our project.

    -Remove the ASE folder. (backup any content you might have added)
    -Restart Unity and check your console for any errors/warnings.
    -Import ASE if there's nothing in the console and check the console.

    Which HDRP version are you using? We don't support SRP 12 yet, we're currently working on updating our templates.

    Please try to avoid duplicating questions on multiple points of contact, I noticed you already discussed this on Discord, I left you a question there.

    Afraid not, I recommend looking into your own Custom Shader GUI so that you may handle this type of configuration directly via Script.

    Hey there!

    Please try to avoid duplicating questions on all points of contact, if it's urgent use support@amplify.pt; timely response guaranteed.

    Our URP 12 compatibility updates is almost ready.
     
  38. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    485
  39. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
  40. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    485
    Well, I am just now upgrading my project to HDR and some of my shaders are still magenta. This one I created with Amplify is one of them. So, I'm not quite sure I understand your question, 'looking to use'? Apologies for my ignorance, I thought I just "used" HDR.
     
  41. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    485
    My apologies, I was talking about HDRP.
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Ah, ok, you meant HDRP not HDR(High Dynamic Range, which could mean a couple of different things). To convert your shader you'd need to use a similar shader type. Provided that you have imported the latest ASE, and have HDRP set up on your project.

    In your particular case you want change the Shader Type to HDRP/Lit to match your original shader.

    upload_2021-11-10_11-35-17.png
     
  43. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    485
    That's it! Thank you very much.
     
    Amplify_Ricardo likes this.
  44. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,792
    Another silly question but can I add a toggle on the material for the backface culling mod? I have the back culled by default but how do I add it as an option on the shader if I want to turn off culling?
     
  45. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Use Inline Properties to set the Cull Mode; be sure that the node used is set to Auto Register.
    For the toggle itself, you can customize the look of the material with a Custom Shader GUI.
    upload_2021-11-10_14-2-20.png


    Just to elaborate, you do have a Toggle Node in ASE but it's not appropriate for this case.
     
    florianalexandru05 likes this.
  46. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    485
  47. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey, which Unity and HDRP are you using there?

    Seems to be working as expected: http://files.amplify.pt/RT/2021/11/wZ0SOxwi91.gif

    Please also confirm what's the ASE version currently used under Window > Amplify Shader Editor > About.
     
  48. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    485
    I'm in 2021.2.1f1, HDRP version 12.1.0 & ASE version 1.8.9r21
    I can switch to whatever you're in. I'm not committed to 2021.2.1
     
  49. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Ah ok, that explains it!

    We don't support HDRP 12 yet, still working on the update. I'd recommend using the previous HDRP distribution, we're almost done with the Template update. When released, all you need to do is save your HDRP 11 shaders, or other version, in your HDRP 12 project to update them.

    Apologies for the inconvenience, major SRP updates take a couple of days.
     
  50. jnbbender

    jnbbender

    Joined:
    May 25, 2017
    Posts:
    485
    If I can bother you one more time, what setup are you testing this with? I have tried a number of different Unity versions & HDRP 10.