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

    WryMim

    Joined:
    Mar 16, 2019
    Posts:
    69
    Do you have an example of a shader that makes Tiling by object Scale? X Y Z? For example, Cube.
     
  2. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Is there a correct way to get a shader to write to the ZBuffer when using Custom Lighting? I've been using the Double Layer Custom Surface example and noticed objects that use it don't get affected by post process effects that rely on ZBuffer, like Ambient Occlusion. I figured maybe I just need to turn it on via the ZWrite setting, but that didn't change anything. I also tried out a simple shader with one Custom Surface Light node, same result. Also all other Custom Lighting example shaders have this problem of not writing to ZBuffer, like Custom Toon. Is this a know behavior? And if so is there anyway to fix it?



    Left - Double Layer Custom Surface example shader included with ASE.
    Right - Regular surface shader using Standard lighting made with ASE.
     
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,225
    bug: undo doesn't restore shader type
    repro: in a URP pbr shader switch to universal/unlit and conntect
    ctrl+Z a few times won't restore pbr shader
     
  4. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,225
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,225
    bug:
    upload_2020-10-1_15-11-11.png
    after a few redo undo ASE started behaving strangely when reconnecting nodes and finally i peeked in the console
    upload_2020-10-1_15-9-11.png
    here is what happens
    ase bug.gif
     
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Can you forward us a version of the shader with the issue present so that we can replicate it on our side? Along with Unity version and renderer used; we appreciate the additional details.

    Please use support@amplify.pt.

    Thanks!


    If you're using Custom Lighting you'll have to actually input some for of Custom Lighting control, otherwise you will see strange results; alternative you can use an unlit shader.

    Somewhat related, you have a Vertex Normal input that you can use.

    Were you also asking about this on Discord?
    Yes, it's called ScaleIndependentTile, built-in sample.



    upload_2020-10-2_12-22-58.png

    Seems to be working, perhaps something specific to your project or Unity version? We'd be happy to test a sample with the issue present. Unlit shaders don't usually write do depth but our Surface Custom Lighting should.

    Try forcing it to create the necessary depth texture, you can add this to your camera.


    Code (CSharp):
    1. private void Start(){
    2.     Camera cam = GetComponent<Camera>();
    3.     cam.depthTextureMode = cam.depthTextureMode | DepthTextureMode.Depth;
    4. }
    Yes, that's known, we're actually remaking our Undo system so it's really flawless; those cases will be taken into account. This is the 3rd revision of the system, it's actually more complicated then it seems but we won't give up on having a perfect undo system any time soon ;)


    Let's not call that a bug, the wiki is due for an update. Apologies for the inconvenience.


    If you see Undo problems don't keep working with ASE, can and most likely will cause other issues, restart Unity immediately.

    Is this issue replicable? If so we can track it down quickly.

    Any details appreciated, thanks!
     
    laurentlavigne likes this.
  7. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    @rboerdijk since you own the shader, it would be better if you send it to Amplify for analysis, but I am willing to do so if you post to the forum giving me permission (it's a copyright issue...I don't have the right to disclose your source code).
     
  8. Freznosis

    Freznosis

    Joined:
    Jul 16, 2014
    Posts:
    298
    Hi, thanks for the reply. I've sent a test project and some images/videos of the problem to your support email.
     
    Amplify_Ricardo likes this.
  9. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    Hei thanks I figured it out! :)
     
    Amplify_Ricardo likes this.
  10. rboerdijk

    rboerdijk

    Joined:
    Aug 4, 2018
    Posts:
    96
    I'll send it over for analysis.

    Update: ... and sent, via email.
     
    Last edited: Oct 3, 2020
    Amplify_Ricardo and syscrusher like this.
  11. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    675
    How can I render a transparent object with writing Zdepth so it sorts out the drawing order issue on the same mesh?
     
  12. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    It doesn't yet support Translucency in deferred render mode? The last time I've stopped using this asset because of this
     
  13. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Transparent objects do not, by definition, write to depth. Depending on the renderer and shader used, you might be able to get away with it by toggling the Extra Pass. However, transparency and sorting are inherently problematic.

    Additional details: https://answers.unity.com/questions/609021/how-to-fix-transparent-rendering-problem.html

    Translucency and Transmission are forward only, what renderer are you using?
     
    syscrusher likes this.
  14. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    That's an excellent explanation of how depth sorting works, but in reading the comments below it, I noted that one person suggested setting the RenderQueue to control rendering order. They correctly defined what this setting does, but they got the ordering backward. Higher RenderQueue numbers render after lower numbers.

    This correction applies to one of the comments, not to the highlighted "accepted solution" part of the page. :)
     
  15. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,794
    I managed to replace the build-in terrain grass shader by making it in Amplify first, then changing the code. This is the result, includes custom wind!


     
  16. Shinono23

    Shinono23

    Joined:
    Dec 25, 2016
    Posts:
    5
    This seemed like a bug, so I thought it was worth mentioning here.

    I'm creating a shader using custom lighting and I noticed my shader has strange behavior when placed next to a point light. At first, I thought it was user error and started disabling things to pinpoint the cause, but after completely disabling every part of my shader and only leaving albedo, the problem is still happening.

    Basically, what's happening is as soon as a point light touches my shader at all, the entire thing becomes maximum brightness.

    I should mention again that every part of this shader is disabled, including lighting, shading, and even coloring. The only thing active in this is albedo:

    https://gyazo.com/ca3abaebc876756482699a08d72787db

    I added the color back for this one, so I could turn it dark gray. Here you can see that when it's on the border of a point light at just the right position, a certain line of influence becomes visible.

    https://gyazo.com/b081961d6dc7096b3b357eaa6d0e7c7f

    The effect is many times more pronounced with everything else enabled.

    This does not happen with standard shaders made with amplify. This only happens when the shader is set to use custom lighting.

    Have I missed something with the basic shader options or is this a bug with amplify?

    edit: I'm using unity 2019.4.2f1, this happens regardless of render queue, and the shader type is surface. This happens whether cast or receive shadows is enabled or not.
     
    Last edited: Oct 6, 2020
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Looks amazing, great job!

    Hello there,

    Does not sound like a bug, if you don't input any form of Custom Lighting control, you will definitely see some strange results.

    Be sure to check our included toon samples.

    I'd like to see your shader in order to best advise you but something like this should do it: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Light_Attenuation

    Alternatively, you also have an Unlit shader type.
     
    florianalexandru05 likes this.
  18. Shinono23

    Shinono23

    Joined:
    Dec 25, 2016
    Posts:
    5
    Your response gave me an idea! It seems this lerp between Light Attenuation and the color white was originally the cause:

    https://i.imgur.com/Z9GsI26.png

    If I change the float value to 1, the problem goes away, but I originally did this because the shadows cast by light attenuation are too dark for my liking:

    https://i.imgur.com/f19u68U.png

    If you have time, do you have any suggestions about how I can lighten these casted shadows without breaking my shader?
     
  19. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Cool, hope you can work it out.

    Not sure what to recommend, I'd need to see the actual shader.
     
  20. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Quick question, Instead of writing shaders myself for my own assets to market, does amplify shader generate a coded shader? Or some type of export that can be used in a project that doesnt have amplify shader?
     
  21. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hello there,

    ASE generates regular shader files, you can distribute them as you see fit. Users don't need the editor to use your shaders, just be sure remove our Custom Material inspector or use your own; not doing so will show a few warnings.

    upload_2020-10-6_22-11-55.png
     
    Mauri likes this.
  22. p_hergott

    p_hergott

    Joined:
    May 7, 2018
    Posts:
    414
    Oh wow, thx
     
  23. unity_0UgQ02SS8pZcvQ

    unity_0UgQ02SS8pZcvQ

    Joined:
    Jan 14, 2020
    Posts:
    3
    So I've got a bit of a head scratcher: I have a very low poly model imported in from Maya. I'm trying to implement a very thick outline, but it gets weird along some of the edges, not following the silhouette of the model. Any ideas? upload_2020-10-8_9-51-24.png
     
  24. DigitalAdam

    DigitalAdam

    Joined:
    Jul 18, 2007
    Posts:
    1,202
    Hi, are there any examples, tutorials, or tips of an Amplify Shader that can be used for hair?
     
  25. SuperUltraHyper

    SuperUltraHyper

    Joined:
    Sep 7, 2015
    Posts:
    112
    I am having issues with Tessellation Shaders after upgrading from 2018 to 2020.

    This is a VR project that was working fine before the upgrade.
    Both before and after, I am using the Built-in Render Pipeline

    Before I was running 2018, Singe Pass (XR Settings) and having no issues.

    Now I am running 2020, Single Pass Instanced, and this mesh is no longer rendering in the right eye.

    I can confirm that changing the XR-Plug-in Management implementation to Multi-pass solves the issue.... but of course the project takes a huge frame rate hit from this.

    I have looked at the page about Single Pass instancing and modifying my shader... but this is not working / is unclear.
    I tried to modify the Tessellation.Shader example you guys provide but I get errors after my modification attempts or it still fails to renter on the right eye.
    https://docs.unity3d.com/2020.2/Documentation/Manual/SinglePassInstancing.html

    The question is, are there any other solutions to my issue?
     
  26. EwieElektro

    EwieElektro

    Joined:
    Feb 22, 2016
    Posts:
    45
    Hey,
    I updated the 2020.2 beta and now it use by default the latest HDRP 10 version. But there are some small changes with LightLoop, so all shaders not run anymore > https://docs.unity3d.com/Packages/c...0/manual/Upgrading-from-2020.1-to-2020.2.html
    Is there already a plan when it get updated? :)

    and BTW: Amplify is still the best Shader Tool! I testet the Shader Graph, but it lacks at so many points. No Get/Register Variables, no Tesellation, and so on …
     
  27. Amplify_Ricardo

    Amplify_Ricardo

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

    It's based on the object normals so I'm going to say that's it's probably working as expected despite not looking as intended; however, I'd be happy to examine a sample.

    Alternatively, you should consider an Image Effect based outline, it has none of the issues usually present with the Unity Outline technique we include.


    Hard to tell, we might need a sample to test.

    Did you update ASE and re-save your shaders as well?

    Hey there, thanks for the support!

    We don't actually support Beta or Alpha Unity versions so you're unfortunately going to have to wait some more until it's available for official use.

    Apologies for the inconvenience.
     
  28. unity_0UgQ02SS8pZcvQ

    unity_0UgQ02SS8pZcvQ

    Joined:
    Jan 14, 2020
    Posts:
    3
    It's for work, so sadly I can't share an example, but I will definitely check out the Image Effect based outline.
    Thank you for the reply and the suggestion!
     
  29. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    We understand, try this: https://github.com/cakeslice/Outline-Effect
     
  30. Maverick

    Maverick

    Joined:
    Dec 18, 2009
    Posts:
    240
    Hello,

    We're getting following error on our old shaders (on compile) that worked well before: invalid subscript 'ase_texcoord5'

    Tested it in a new shader and apparently any ref to UV bigger than 4 throws this error. It's a standard surface shader.
    (please note that vertex tex coord node is connected to local vertex offset output)

    upload_2020-10-10_16-36-10.png

    Using unity 2018.4.26f and ASE 1.8.4 rev 0


    Regards.
     
  31. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Hi, I'm trying to create a grass shader(standard specular) everything works as it should except from the normals which give me some weird darkening how can I fix this, when used with terrain builtin shader there is no darkening. Do I need to remodel the grass mesh or is there some shader trick?
     
  32. SuperUltraHyper

    SuperUltraHyper

    Joined:
    Sep 7, 2015
    Posts:
    112
    @Amplify_Ricard

    Re: Post #6175

    Yes, I did Update to the latest ASE version and recompile those shaders. This isn't working.

    I have attached 2 sample projects.

    \\Tessellate_URP\Tessellate_URP\Assets\Scenes\Test.Unity
    This uses the Universal Render Pipeline with the Lightweight Asset Pack acquired from the asset store.
    This has a sample shader with tessellation. This renders to both eyes but doesn't tessellate correctly.

    \\Tessellate_BinRP\Tessellate_URP\Assets\Scenes\Test.Unity
    This uses the Universal Render Pipeline without a scriptable pipeline assets assigned..
    This has a sample shader with tessellation. This only renders to the left eye but does tessellate correctly.

    Any help would be appreciated!

    ________________________________________________________

    Previous post for easy reference:

    I am having issues with Tessellation Shaders after upgrading from 2018 to 2020.

    This is a VR project that was working fine before the upgrade.
    Both before and after, I am using the Built-in Render Pipeline

    Before I was running 2018, Singe Pass (XR Settings) and having no issues.

    Now I am running 2020, Single Pass Instanced, and this mesh is no longer rendering in the right eye.

    I can confirm that changing the XR-Plug-in Management implementation to Multi-pass solves the issue.... but of course the project takes a huge frame rate hit from this.

    I have looked at the page about Single Pass instancing and modifying my shader... but this is not working / is unclear.
    I tried to modify the Tessellation. Shader example you guys provide but I get errors after my modification attempts or it still fails to renter on the right eye.
    https://docs.unity3d.com/2020.2/Documentation/Manual/SinglePassInstancing.html

    The question is, are there any other solutions to my issue?
     

    Attached Files:

  33. Sheynes

    Sheynes

    Joined:
    Mar 27, 2017
    Posts:
    66
    Hello, I would be interested to purchase your asset.

    I want to use stencils shader on the unity HDRP using my vr headset.

    Obviously stencils are all broken on HDRP, so I am wondering if your shader editor allow to use stencils also for HDRP ? I'm just trying to reproduce HDRP Lit default shader with a stencil mask to show and hide it behind an invisible window.


    Is this image from your asset showcase also working on the scriptable pipelines ?

    https://assetstorev1-prd-cdn.unity3...hot/08c4f190-a13d-4a5b-919f-dbc60b220e00.webp
     
    Last edited: Oct 12, 2020
  34. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hello there,

    Please try downloading the latest ASE version from our website and re-saving your shader to confirm if the issue is corrected.

    I believe that support for 8 channels was added on 2018.2; and we've made a few related fixes since, so it should work.


    Not sure what could be happening, can you share a screenshot?

    Try inverting the vertex normal value on backfaces so they can be lit correctly; something like this: https://i.imgur.com/ot5kgn8.png


    Thanks, really appreciate the sample!

    Unfortunately, we're not going to be able to test this in the coming week. To make a long story short, one of our team members tested positive for COVID so we're mandated to stay home and isolate for 14 days; all our VR kits are at the office.

    Thankfully, some of us already tested negative, we're all ok for now including our positive colleague(mild effects).

    Hello,

    Stencils are heavily used by HDRP, by default we setup the stencil buffer automatically to make it work with HDRP, but you can change it if you know exactly what you're doing.

    Consider a new Lit shader for example, you can see that some stencil option already have some properties.



    If you remove that property and use your own value you may end up destroying the original stencil value that is required for HDRP.
     
    Last edited: Oct 12, 2020
  35. Sheynes

    Sheynes

    Joined:
    Mar 27, 2017
    Posts:
    66
    Hey again,

    So you basically do not have an example scene with a working stencil mask on hdrp using your shader editor ?
    I just want to be sure. Cause my problem is exactly what you describe, the fact that hdrp use the buffer for other things, and I thought you may have solved it already using your shader editor.

    Thank you !
     
  36. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    My apologies, I was going to mention this in the previous answer.

    The sample your referenced is for the built-in renderer only, there are no HDRP stencil samples.

    To be clear, an HDRP already uses a pre-configured Stencils, which are required. It's not really a problem to solve, it's how HDRP works so we're unable to actually offer any alternatives; we have to provide HDRP shaders as they are intended by Unity.
     
  37. Sheynes

    Sheynes

    Joined:
    Mar 27, 2017
    Posts:
    66
    Thank you very much for your answer.

    If in the future you find a way to solve this issue by the use of any tricks, like custom render pass, or because unity allow you in further version to realize this effect, or anything be sure that I will purchase your tool.

    Best regards !
     
  38. JohnnyFactor

    JohnnyFactor

    Joined:
    May 18, 2018
    Posts:
    343
    I'm trying to understand the relationship between Amplify and terrain layers. I have an animated water shader I would like to use as a terrain layer, but I don't see anyway to do that.
     
  39. Howard-Day

    Howard-Day

    Joined:
    Oct 25, 2013
    Posts:
    137
    Hi! I've tried to find this information on my own but not come up with anything that seems to work. What's the correct method for doing a soft alpha blend particle shader in ASE?
    I tried adding "Soft Particles Factor" but that's not a node that exists, according to ASE.
    Thanks!
     
  40. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Volume effects will be supported in a later version.

    Simply put, the shader has specific properties that are used by the terrain layers. For example, your layer might have an Albedo and Normal, how they are displayed can be manipulated in the shader. Double click the Four Splats Shader Function to see how it's done.

    However, water on the actual terrain is not recommended; you'd commonly use something on top of the actual terrain for greater control.

    You can create it manually but there are tools out there that can help with that such as R.A.M 2019 - River Auto Material.

    Are you using the proper Shader Type?

    upload_2020-10-13_11-7-54.png
     
  41. Radekk

    Radekk

    Joined:
    Dec 27, 2014
    Posts:
    9
    upload_2020-10-14_19-0-39.png

    after importing I got some errors.. why ? Can anyone help me please ?
    Unity 2019.4.12f1

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

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    After importing ASE into an existing project? What are those pink objects using?

    Please confirm that you are on the latest ASE version.
     
  43. imaginationrabbit

    imaginationrabbit

    Joined:
    Sep 23, 2013
    Posts:
    349
  44. Amplify_Ricardo

    Amplify_Ricardo

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

    Can't really think of an existing sample doing that. Any issues creating it on your side using ASE?
     
  45. Radekk

    Radekk

    Joined:
    Dec 27, 2014
    Posts:
    9
    I change project to HDRP and then updated ASE to latest version. Those pinks objects are using ASE shader which is not HDRP, but I cannot switch shaders to HDRP because I got this errors and custom UI is not created as you can see on screenshot.
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Not entirely sure what's happening on your side, I recommend deleting the ASE folder and re-importing the latest version.

    1. Check if you still see any errors after the fresh import, if so, we're going to need to see what else is on the console.
    2. Open one of the old shaders and hit save to update it; if all goes well it should now be back to normal and not pink.

    If the problem persists, we'd be happy to examine a small project sample.
     
  47. VictorKs

    VictorKs

    Joined:
    Jun 2, 2013
    Posts:
    242
    Well that didn't work, but I found out 2 solutions lerping vertex normals to look upwards or adding transmission. So upward normals make grass quads look flat but transmission works really great, only problem is that it is forward and ruins my performance. So do you have a deferred solution or some pointers maybe a different asset I could buy. And lastly is your implementation of transmission lightweight? Thanks in advance!

    BTW your solution didn't work because normal direction switching was visible.
     
  48. daville

    daville

    Joined:
    Aug 5, 2012
    Posts:
    303
    Hi! I have two issues with the Unlit URP Preset, I'm creating a custom lighting shader for my characters, everything else uses the PBR template, so only my characters show this two problems:

    - They only receive Directional Light, everything works fine with the directional light, but they ignore any other type of light.

    - I'm using a Plane with the "Depth Fade" node to fake fog... it works perfectly with any other PBR shader, but my custom unlit shader gets ignored, it seems as if the preset is not writing depth info.


    I checked and the write depth is enabled, and I don't see any option to enable multiple light sources. (here's an example, my character gets ignored by the depth, it should look as white as the grass to the right)


     
  49. Radekk

    Radekk

    Joined:
    Dec 27, 2014
    Posts:
    9
    After deleting ASE folder and re-importing its worked !! Thanks!
     
  50. Amplify_Ricardo

    Amplify_Ricardo

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

    Just to elaborate, our Transmission and Translucency options are the same as Untiy, it's Foward only and as lightweight as it can be. I'm afraid I'm not familiar with any other packages; renderer used is also a factor.


    Hey,

    Did you also post this on Discord? I have to check those out, been away from it for a bit.

    1. You need to account for additional lights in URP, please check the stream below. If the problem persists, forward us a simple example shader with the problem present so that we can debug it on our side.
    We're using LW here but it's the same thing for URP:


    2. Not sure there, happy to check it out after you determine if you're missing anything on point 1 based on our video.

    Fantastic!
     
    daville likes this.