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

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello, thanks for the additional details!

    It does seem to be getting incorrect values on those low shadow distances, without additional cascades. Increasing the the Camera Near Clip value does help mitigate the problem.



    I will pass this on to our developers for further examination.
     
  2. mellinger

    mellinger

    Joined:
    Sep 3, 2012
    Posts:
    13
    Hi,
    I try to create an outline shader for URP and I think its a little bit over my head ... found your Dev Stream #4 video which was a good starting point so I created this shader:
    upload_2021-5-5_22-36-22.png

    So I have the setup with the ExtraPrePass, outline is there, I think I understand whats happening.
    But: Now im trying to make the red part transparent and only the yellow outline visible ... something like this:
    upload_2021-5-5_22-39-9.png
    Thats just a fake, I switched the red color to background green background color but thats the result Im aiming for ... is this possible? Any hints how to achieve this?

    thanks!
     
  3. mrstolen

    mrstolen

    Joined:
    Jul 31, 2013
    Posts:
    6
    Hello,
    I have a occlusion shader for 2D sprites that dissolves when the camera is too close (and it works just fine)

    My issue is that since I added shadows to the scene, somehow the shadows are also affected by the camera distance, meaning that they start dissipating when I get close to the shadows.

    Is there any way for the shadows to ignore the occlusion logic? I would assume that it would only apply to the sprite itself but I guess I am wrong:

    upload_2021-5-5_23-36-55.png
    upload_2021-5-5_23-37-11.png
     
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello!

    Are you going to be changing the opacity of the base object(red), or do you just need the outline?


    Hello there!

    You can either use a second object set to Shadow Only or do something along these lines: https://forum.unity.com/threads/bes...er-creation-tool.430959/page-115#post-5952461

    A second object that casts the actual shadow would probably be the best choice; easiest to setup. (Mesh Component parameters)
     
  5. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,813
    I tried it in Unity 2021.1.1f1 and non of the shader work. I noticed that Amplify shaders don't work for HDRP 2020.3 and 2021.1 which are the versions I'm using.

    Screenshot_38.jpg

    I have Amplify Version 1.8.9.000
     
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey there, did you re-save those samples to update them to your current HDRP version? That should do it, if not, let us know.

    Also be sure that you're using the most recent ASE version currently available from our website, the Asset Store update should be up soon if you prefer to wait.
     
    marie-hmm and florianalexandru05 like this.
  7. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,813
    I made a new project and used the latest version of ASE, the samples from the snapshot is from there and they aren't working. I will try my shaders, resave them and let you know. I'm getting strange glitching effects, the same thing my clients are getting. I'm good, I'll wait for the latest version to hit the store, I'm not rushing. :)
     
  8. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,813
    Ok, that did it, re-saving seems to have fixed the issue.
     

    Attached Files:

    hopeful and Amplify_Ricardo like this.
  9. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Is there an approximate date for when the next update would be coming?
     
  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    On our site or store? We've been updating the site version regularly, the Asset Store version will be up soon.
     
    Cactus_on_Fire likes this.
  11. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    Thanks!

    Improved the cartoon explosion shader

     
  12. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Impressive!
     
    Cactus_on_Fire likes this.
  13. Gullie667

    Gullie667

    Joined:
    Apr 21, 2021
    Posts:
    17
    I am attempting to create a basic mobile material. It will be used on both lightmapped and real-time lit (Directional Light) materials.

    So far so good except I am unsure how to get rid of this static switch that I must manually set per object / material in the scene.

    The switch currently must be set manually to choose between a lightmap or real-time lighting.

    How should I implement this so its automatic and such that multiple versions of the same material is not needed?

    Thanks in advance!

    upload_2021-5-20_12-48-21.png
     
    Last edited: May 20, 2021
  14. Pablomon

    Pablomon

    Joined:
    Mar 9, 2015
    Posts:
    47
    Hi! First, I've been using ASE for a while now and I love it!
    Some of my shaders have broken using the unity 2021.1.6f version. Apparently is the Radial UV Distortion node. When I use it the shader outputs white no matter what.
    Is there some known incompatibility with 2021?
    Thanks!
     
  15. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389

    Hey there, I recommend a using a simple script to check if the object is set to static and adjust the value accordingly; you can do this On Awake or On Start. Assuming these are objects you're creating at runtime. This is one of those cases is which using two materials might also be a good choice.


    Hello!

    We're not aware of any similar cases, the Radial UV Distortion SF node is not something that could break in that sense so this is something we will have to examine. Can you send us a simple example for further testing on our end? (Shader, Shader Functions(if any), Material, Textures)

    We're available via support@amplify.pt

    Thanks!
     
  16. PollCreativeRobot

    PollCreativeRobot

    Joined:
    Jun 1, 2019
    Posts:
    1
    Hi , we have some problems with a grass shader and the projected realtime shadows, applied in a bunch of quads with transparent cutout. We've tried a lot of different methods(Alpha test, geometry...) and searched in the web, but nobody seems to have the same problem. (we are using built in RP because the project requirements)

    image (2).png image (3).png

    Thanks!
     
    Last edited: May 27, 2021
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello!

    Unsure of what could be causing it, can you send us the shader and accompanying textures? We're available privately via support@amplify.pt.

    Thanks!
     
  18. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Just got back to your email, it seems that Cast Shadows was off in your shader, toggle it to correct the problem.

    You can still disable it in the Mesh Component but still receive shadows from other objects.

    upload_2021-5-27_17-29-45.png
     
  19. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389

    Hey!

    Just to let you know that we still don't have a workaround for this; we're accessing Unity provided values so there doesn't seem to be much we can do at the moment; we will investigate in any case.

    The current solution is to increase your Cascade parameters or try increasing the Camera Near Clip value does help mitigate the problem.
     
  20. KenanTheFab

    KenanTheFab

    Joined:
    Apr 29, 2018
    Posts:
    8
    upload_2021-5-28_3-58-42.png
    Brute forcing my way into making a black hole-esque shader. It is decent enough but I can't get the outer edges of the sphere to soften and not be hard. Any pointers?
     
  21. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hey, I'd recommend using different Fresnel values for the border fade and Multiply it by the final result; in any case, your Opacity is not set, you might want to plug it in there as well.
     
  22. KenanTheFab

    KenanTheFab

    Joined:
    Apr 29, 2018
    Posts:
    8
    upload_2021-5-28_16-34-24.png
    Do you mean something like this? It is closer to my ideal result but the "black hole" still has obvious edges rather than fading.
     
  23. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    You could use the actual Fresnel effect, or another one, to manipulate the opacity; as is, your opacity is uniformly set to 1.
     
  24. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    Can we please get the editor update so that Unity 2021.2 URP 12 2DRenderer to work? I have tried to upgrade from 2021.1 URP 11 to 2021.2 URP and all my amplify shader is broken. It shows fine in the shader editor, but compiling them results in error.
     
  25. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Of course, we're always on the look out for possible issues with new versions. What exactly is the error?
    I'll ping our devs asap.
     
  26. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
  27. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Edited, removed my previous posts.

    My apologies, I misread the version; we don't support Alpha distributions as you may know. We will try to prioritize this in any case, apologies for the inconvenience.

    Any chance of a sample shader? That would speed up things if it's also something specific to your shader. (support@amplify.pt)
     
  28. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,517
    It's sent and done! I think the issue is with URP 12 not the Unity being alpha. You can install URP 12 in the 2021.1 if you want. In any case, I have sent the sample so thanks for taking a look!
     
  29. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Thanks!

    To our knowledge, URP 12.x is not currently listed as a Release version; using the latest 2021 official release.
     
  30. a_d_69

    a_d_69

    Joined:
    Jun 7, 2017
    Posts:
    13
    hi! tell me, can I somehow restore the Shader Function? I have several functions in the shader that were lost. If you don't open the shader in the editor, everything works, but if you open it for editing, the shader functions disappear and the shader breaks. Is there any way to restore lost functions without rewriting them?
     

    Attached Files:

  31. Amplify_Ricardo

    Amplify_Ricardo

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

    Shader Functions are unique Asset Files, they are not part of the shader itself. Do you no longer have access to the SF's used? If this is an asset package, there's a good change the original developer either didn't include them or does not wish to do so.

    Let us know.
     
  32. unity_MyWwvGAFstre6g

    unity_MyWwvGAFstre6g

    Joined:
    Oct 27, 2020
    Posts:
    6
    Hello! Quick question on Static Switches:

    When using a Static Switch, in a build, are both sides of the switch calculated, or is there some sort of shader culling/optimisation?

    Example: I have complex calculation on the True side and other complex calculations on the False side. Are both these calculations being computed every frame, the static switch simply throwing away the results that are not used (but still after having to calculate them)?

    Thank you
     
  33. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    The Static Switch only calculates the active input, that's the ideal option for variants. Keep in mind that they are good for optimization but increase compile times, use where appropriate.
    https://docs.unity3d.com/Manual/SL-MultipleProgramVariants.html
     
    unity_MyWwvGAFstre6g likes this.
  34. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    977
    How do I make a shader with custom lighting mode receive enlighten light?

    This shader:


    Will produce this result:


    While this shader:


    Produces this result:


    edit:

    Same goes for baked lighting actually.

    Custom lighting:


    Standard:

    EDIT 2:

    NEVERMIND! All you had to do was connect the albedo on the master node for it to work with lightmaps!

    EDIT 3:

    Is it possible to get GI working on a custom lit (aka unlit) shader in URP though?
     
    Last edited: Jun 1, 2021
  35. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Yes, should be possible. Do you have an existing URP Custom Ligthing(Unlit) shader you're trying to adapt or would a simple example do?
     
  36. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    977
    A simple example would do.

    Currently I just have this for testing, and it doesn't work with GI.

     
  37. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    That Shader Function is not meant for URP, custom lighting is more restrictive with the Universal Renderer.
    Check out this video for additional details; using LWRP here but it's the same for URP(37:43), sample in comments.



    As for baking light with an Unlit, you need to make sure Meta Pass is enabled, this will give you an input for the Bake Albedo/Emission used by the baker.

    upload_2021-6-3_11-42-33.png
     
    SunnySunshine likes this.
  38. SunnySunshine

    SunnySunshine

    Joined:
    May 18, 2009
    Posts:
    977
    Awesome, thanks for the pointers. :)
     
    Amplify_Ricardo likes this.
  39. delaneyking

    delaneyking

    Joined:
    Jan 11, 2017
    Posts:
    8
    I have an artefact appearing in URP with custom lighting in amplify. It's a rectangle that appears square to my view, seemingly the bounds of the light.

    Here I am using the light to blend between two matcaps. However, even when I do not involve the light I see this artefact.

    Everything is default, except I am only rendering the add pass.

    Any ideas?

    upload_2021-6-7_16-40-56.png
     

    Attached Files:

  40. Amplify_Ricardo

    Amplify_Ricardo

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

    That's expected, internally that's how Unity represents that data. Your current graph is correct for the built-in render but in URP you'll have to use the SRP Additional Light node for additional lights. This is demonstrated here:



    LWRP sample in the comments, it's the same for URP(just change the shader type to URP Unlit): https://tinyurl.com/s57tu7k

    Our apologies for the lack of information, there's a mention in our Wiki but this definitely needs a proper tutorial/section as soon as things are set in stone.

    Let us know if you still see the same problem on your end after using the SRP node, we'd be happy to examine a sample shader.
     
    Recon03 likes this.
  41. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    AH HA!!! I CAUGHT YOU I CAUGHT YOU I CAUGHT YOUUUU OHHH YOU STINKER TRY AND WASTE MY TIME ON A WILD BUGGOOSE CHASE WILL YOU

    Amplify sometimes forgets the blend modes that I set them to previously and sets them to One Zero.
    upload_2021-6-13_19-59-13.png

    If at some point while you are editing a shader, it suddenly starts acting strangely, CHECK THE BLEND MODE before ripping your shader apart trying to debug it.
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    We honestly have no idea what could be happening on your side, we have not received any similar reports. It would be helpful to have a clear description of what you're doing on your end in order to replicate it, or a shader sample for further examination.

    Hope this is something we can identify in order to quickly fix it, thanks in advance.
     
    moatdd likes this.
  43. moatdd

    moatdd

    Joined:
    Jan 13, 2013
    Posts:
    178
    It might be something that occurs because I have multiple versions of the shader opened simultaneously within separate tabs upload_2021-6-14_15-45-28.png

    So updates within one version of the shader are spilling over into the other.

    Both versions of the material reference the same Amplify Shader Function which forms the core of both shaders, so it's likely that when I save the core function, and then save the other two shaders, that something screwy happens.

    In any case, the error is something that appears erratically but I know to watch out for it when it happens.

    I have to use two separate shaders that perform the same function but they are part of a post process effects stack and they apply at different times and with different pass/stencil modes, and one shader has to be applied to frontfaces while the other applies to backfaces.

    Don't worry this is just what comes with the edge case scenarios I perpetually find myself stuck in.
     
  44. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845
    I have not checked in awhile , but I see Amplify is supporting HDRP. I used to use for years, but I wanted to get an update, is there anything that Amplify is not supporting for HDRP... we can still use custom functions like before? our Substance's and so forth?

    I want to be sure before I start using again. Thanks. Unity made a mess of HDRP, SO I was staying away for a bit.


    PS: I tend to make a lot of the same shaders or shaders alike in Unreal and Unity. So it would be great to finally start making some HDRP ones. in Amplify. Thanks
     
  45. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Sorry, some confusion here perhaps. Materials don't reference Shader Functions directly, Materials reference the shader used; it's the shader that accesses the Shader Function to generate the appropriate shader code when you save.

    -If you make changes to the SF and then save a shader, this will update the shader you save; it's important to note that it only updates that particular shader, others shaders using the SF will only be updated when they are saved.
    -If you alter a shader used by two different materials, both will be affected.
    -Material Properties on the other hand are specific to each material.

    I suspect that you might have had that value change, as a shader parameter, which would in turn affect all other instances you're using; in a sense "spilling" as you put it; this is of course expected, regardless of using our editor.

    What you can do here is use Properties, instead of a shader parameter, to handle Scr and Dst values per-material. You can do this by creating a float node, setting it to "Auto-Register", and setting it as an inline property by pressing the circle button next to the shader parameters.

    Hope it helps!

    upload_2021-6-15_10-56-42.png


    Hey there,

    Most things work as expected, including with more recent HDRP versions. There are of course some exceptions, such as Built-in specific features or nodes like Outline effects, or the URP Reflections Probe node; those are specific to their own renderer. Likewise, you wouldn't expected HDRP SSS to work on the built-in renderer.

    That said, we're aiming at parity with Shader Graph, if you do find any problems we'd appreciate any feedback so that we may improve ASE.

    There are two specific HDRP features we're still tackling, HDRP DXR and Image Effect creation is not supported yet.

    VFX Graph is also not officially supported at the moment, but this is not necessarily specific to HDRP.
     
    moatdd and Recon03 like this.
  46. Recon03

    Recon03

    Joined:
    Aug 5, 2013
    Posts:
    845

    Thanks for the detailed reply. that is helpful.
     
    Amplify_Ricardo likes this.
  47. MythicalKit

    MythicalKit

    Joined:
    Oct 19, 2018
    Posts:
    4
    Hello,

    I picked up amplify and am trying to use the parallax occlusion shader from the examples.

    I need to have multiple adjacent tiles with a parallax on them, but it creates a strange effect where each tile is raised above each other visually and you can look through the tiles. If I disable the 'Clip Edges' property on the parallax node, then there is a strange distortion at the seams of the meshes instead. Is there a way to solve this? Thanks!

     
  48. Amplify_Ricardo

    Amplify_Ricardo

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

    Can't quite make out what's happening there, would a sample be possible? (support@amplify.pt)

    Thanks!
     
  49. Cross22

    Cross22

    Joined:
    Sep 26, 2014
    Posts:
    22
    It would be really helpful to have some best practices documents regarding Texture Objects, Sampler States, Texture Samplers, and reference vs. property samplers. Because some of these got added later the Wiki does not do a great job at covering them.

    I know I can simply create a Texture Sample node which then internally creates a Texture Property, a Texture2D SamplerState, and performs a texture fetch when run. What if I want to reuse the exact same texel later? Should I store it in a variable or is ASE/ShaderLab smart enough to detect that anoter Texture Sample node with identical settings can be compiled away?
    Related use cases: What if I want to sample the same texture but with different UVs? How about reusing the same SamplerState but with a different texture map? It looks like all those cases are supported by ASE it's just the lack of up-to-date documentation making this a bit muddy.
     
  50. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,389
    Hello,

    Any other specifics you'd like to see covered on the best practices reference? We tried to make this as complete as possible but at some point we start falling into Unity specific shader practices and not necessarily ASE; however, we are open and looking to improve our documentation whenever possible.

    I should point out that there is a wiki update in the works, there's been a couple of changes since we added Sampler States that are still missing(long overdue unfortunately). To our knowledge, Texture Objects and Texture Sample nodes, and Samplers States, each describe their purpose in a satisfactory manner, but the latter can definitely use additional details; our apologies for any confusion.

    Reference Sample will reference only when no SS is plugged into your Texture Sample node, notice that it becomes grayed out once you plug your SS. Not to be confused with "Reference Mode" of a Texture Sample node that, according to our wiki, points to an existing Texture Sample node

    You can sample the same exact Texture 2D multiple times with different samplers states by referencing it. As for "reusing the same texel" or storing, do you have a specific case in mind?

    Yes, all those cases are supported, with the exception of some filtering and wrap modes not available on some platforms according to Unity references. Once more I must apologize for the lack of details here, this is definitely one of the less detailed parts of our wiki and we intend to cover this in greater detail as soon as possible. Once this info becomes available we'll also promote the use of Sampler States more, this functionality is not very well known by many users.

    Just to be clear; Sampler State support involved some in-depth changes, this is still subject to change as it matures.

    Thank you for understanding.