Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    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!

    I'm afraid that's one of those features we can't toggle off.
     
  2. hufeng923

    hufeng923

    Joined:
    Jun 10, 2015
    Posts:
    8
    find a pbr lit Transparent mat bug in latest ASE: URP 12 buildin SSAO draw over the TransparentSurface upload_2021-12-22_15-28-31.png
     
    Last edited: Dec 22, 2021
  3. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    71
    Hi Amplify,

    I have an question to a problem, which I can't solve on my own.

    I have the newest version 1.8.9.033 on Unity 2020.3.24. My pipeline is URP.

    I want a lit shader, but it should ignore environment lighting. Also ignoring environment reflection.
    I created a Universal/PBR shader, connected some textures but then I'm stuck.

    When I use "Surface" a got the rendering options, where I can disable ambient light. But using URP these options disappear. I could imagine, that I have to set additional directives (under pass) for my shader... some "pragma noambient" magic, but to be honest: I have no idea, what to write in. Maybe someone can give me some help. In general, bringing the rendering options to urp would be nice.

    best regards
    Simeon
     
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    That might be expected since the transparent shader does not write to depth, does a Shader Graph transparent shader not produce the same result?

    Hey there!

    This can indeed be confusing as those parameters changed a bit since Built-in on Unity's side, thankfully you can still do it in URP Lit shaders with a Static Switch which allows you to disable specific Shader Features.

    _SPECULARHIGHLIGHTS_OFF
    http://paste.amplify.pt/view/raw/a74e4bc0

    _ENVIRONMENTREFLECTIONS_OFFFF
    http://paste.amplify.pt/view/raw/4095910b

    Paste each link into your editor window; these nodes are already set to "Auto-Register" so you don't need to plug them into your graph.

    upload_2021-12-22_10-55-58.png

    For reference, the links above were created using our Share Button which allows you to share selected nodes with other users.

    upload_2021-12-22_10-58-35.png
     
    Squize likes this.
  5. hufeng923

    hufeng923

    Joined:
    Jun 10, 2015
    Posts:
    8
    Shader Graph get correct result. I find out when is option enabled ASE have right result
    upload_2021-12-22_19-10-0.png
     
  6. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    71
    Thank you for your fast reply. I added these nodes (which is pretty easy), but still can't see an effect.

    Is there a documentation which lists these shader features? I could't find some.

    Your examples seem to turn off specular highlights and reflections... most important would be to turn off environment lightning. So that under Lighting->Environment->Environment Lightning the Intenstity slider does nothing, if the source is set to color and white.

    I duplicated your node and tested _ENVIRONMENTLIGHTING_OFF as property and custom name, but it didn't worked.
     
  7. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Ah sorry, misinterpreted your original post, you want something similar to the actual Ambient Toggle on ASE Surface Shaders. Unfortunately, that function(noambient) is not available, afawk, in URP.

    Apologies for the lack of details but references for this are a bit scattered, and somewhat lacking, on Unity Documentation and Forum Posts/Answers; it's not really specific to our editor.
     
  8. noemis

    noemis

    Joined:
    Jan 27, 2014
    Posts:
    71
    Ok, thank you. Good to know, that I not oversee something easy. Then I'll have to find a workaround.

    edit some hours later: glad, that urp is so scriptable. my workaround is the following: I used a second camera (as overlay camera for the main) and set object and lights to an extra layer, also the masks. To also exclude ambient lightning I wrote a script, which saves the values of intensity or color at beginCameraRendering event, sets them 0 or black and then writes back endCameraRendering. works as expected.
    see here:
    https://docs.unity3d.com/ScriptReference/Rendering.RenderPipelineManager.html
     
    Last edited: Dec 22, 2021
  9. TyrusPeace

    TyrusPeace

    Joined:
    Jun 30, 2009
    Posts:
    37
    I've been having problems with point lights resulting in rectangular color through on objects when used with Amplify Shader Editor's Custom Lighting. I tried to drill down and fix the problem and realized it happens with the simplest possible custom lighting shader:
    amplify-customlights-test2.gif

    Default surface shader with the custom lighting model selected, running in the built-in render pipeline. Amplify Shader Editor 1.8.9r33, Unity 2019.4 LTS, happens in a fresh project with only ASE imported.

    Is this expected behavior? I don't see a way to handle point lighting separately in the shader, and there's nothing in this shader that should care about light attenuation any way.

    I'm poking at all of this to try and fix my game's ASE toon shader, which gets these rectangular halos if I have point lights in a bright area. It's as if point lights keep adding some light/color value which I don't have a handle on. This test definitely seems to confirm that suspicion.
     
    Last edited: Dec 29, 2021
  10. Cactus_on_Fire

    Cactus_on_Fire

    Joined:
    Aug 12, 2014
    Posts:
    666
    The box projected cubemaps look distorted compared to the standard shader. I'm using custom lighting where I plug the "indirect specular light" node to get the reflections. How can I solve this?

    The above is the standard shader, the bottom one is ASE

    box project.jpg
     
  11. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Happy to know you found a workaround! URP may not offer some older options present in Built-in but it's definitely flexible.


    Hey there, sorry for your troubles but this is expected. That is the Unity provided value, lighting and shadow information is actually provided by the Attenuation node; which you'd normally multiply with the Light Color node to get the "correct" value.

    If you decide to tackle Custom Lighting in URP, keep in mind that you'll need to use the SRP Additional Light node. This is covered on this stream(LWRP used there, same for URP):
     
  12. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there! Would it be possible to compare both on our end?

    Thanks!
     
  13. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,590
    I just made my own foliage nature shaders with amplify and I love the amplify editor so far. Somehow I managed to even fake branch bending on my own without having pivots and now I'm converting the shaders to URP but how do I make the shaders work with URP Deferred? When I switch the rendering in URP to deferred the models become invisible. I don't see any option to add deferred in the editor?
     
  14. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    You shouldn't need to do anything provided that you're using the latest ASE version with URP 12.x or higher. Reach out to us via support@amplify.pt with a shader sample, we'd be happy to have a look. Does depend on the shader, and shader type.
     
  15. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,590
    Thanks, I'll send an email as soon as I have some time, my shader types are the default URP lit one and they all seem to disappear on deferred rendering.

    Btw right now I have another question. Why isn't HDRP translucency affected by shadow? I tried both deferred and forward, made sure all the HDRP settings are on, and messed around with the diffusion profile. Results have been the same, it's not occluded by shadow and glows from the front too. If I try translucency or sub-surface it makes no difference. Did I miss something or is that this HDRP scattering works? If it is how do I go about making translucency in HDRP?

    HDRPmess_01.jpg hdrpmess_02.jpg
     
  16. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,590
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
  18. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    906
    got projector project in backward ! what's i can do for fix that's thank's
     

    Attached Files:

  19. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, can you elaborate? Thanks!
     
  20. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,590
    No need, I figured that out too, it looks like, certain types of properties don't work in deferred. That's actually kind of annoying, is there any way to have the shader fallback somehow without me needing to make 2 different shaders? I'm making a foliage shader and the translucency option doesn't work in deferred so I'd like it to not read the translucency when I switch to deferred. I don't know if that's possible.
     
  21. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    906
    got projector inside sphere with inversed normal

    i make video maybie it's more easy too see what's happen

     
  22. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Do you have any type of falloff on the projector?

    Seems to work ok with it, but not without: http://files.amplify.pt/RT/2022/01/gLcEaQqzME.gif

    This could be specific to how projectors work.
     
  23. mjako64

    mjako64

    Joined:
    Feb 9, 2017
    Posts:
    9
    Hi again.

    I'm using the depth fade node to get this outline effect, which works great for the most part. My only issue is that having this shader in the scene doesn't automatically enable the depth texture on the camera, which in my game is turned off by default unless AO is enabled. Is there a flag in the rendering options or elsewhere that will do that for me without having to enable it via script?

    Thanks in advance!

    upload_2022-1-12_11-20-28.png
     
  24. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,590
    Never mind about the translucency when I switch to deferred, I figured out now, lol
     
  25. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hey there!

    Unfortunately, Unity does not handle that automatically for you regardless of the shaders used, it really depends on your project. I should point out that this is not a requirement with Deferred rendering as Unity will always provide the required data there, only Forward rendering requires you to manually activate it.

    With the Universal Renderer you can just enable it in the URP Asset Parameters, along with the Opaque texture required for any effects that may use the Grab Color node.
     
  26. mjako64

    mjako64

    Joined:
    Feb 9, 2017
    Posts:
    9
    Ah okay, that makes sense. Thanks for the info!
     
    Amplify_Support likes this.
  27. Controller51

    Controller51

    Joined:
    Jan 13, 2022
    Posts:
    1
    Hi Folks!

    I'm trying to create a a shader that supports GPU instancing. I can set my floats, ints to 'InstancedProperty' and If I debug my shader with "RenderDoc" I can see the GPUinctancing working. When I replaced the 'instancedProperty' with a texture sample there's no 'instancedProperty' type available and I guess the GPUinstancing is not working because the texture is a property type, right?!

    So my question is: How can I get GPUinstancing work with a texture? I don't need different textures for this shader so it would be okay to set the texture somwhow to 'const'...
     
  28. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    That's not possible AFAIK, check this post: https://forum.unity.com/threads/instance-of-texture.500408/#post-3255686

    I recommend looking into Texture Arrays(Texture Sample node) and Sampler States, both can be used with ASE.
     
    Last edited: Jan 14, 2022
  29. cajphrase

    cajphrase

    Joined:
    Apr 24, 2021
    Posts:
    9

    This doesn't work for me. I get the following error (multiple times, once for each pass):

    Shader error in 'TerrainScatterASE': redefinition of '_AllInstancesTransformBuffer' at line 1083 (on d3d11)


    This generates the following after the #pragma's:
    Code (CSharp):
    1. #pragma multi_compile_instancing
    2. StructuredBuffer<float4x4> _AllInstancesTransformBuffer;
    And then this after the CBuffer:
    Code (CSharp):
    1.             UNITY_INSTANCING_BUFFER_START(TerrainScatterASE)
    2.                 UNITY_DEFINE_INSTANCED_PROP(float4x4, _AllInstancesTransformBuffer)
    3.             UNITY_INSTANCING_BUFFER_END(TerrainScatterASE)
    and finally this in the vertex shader:
    Code (CSharp):
    1. float4x4 _AllInstancesTransformBuffer_Instance = UNITY_ACCESS_INSTANCED_PROP(TerrainScatterASE,_AllInstancesTransformBuffer);
    Any help would be appreciated.
     
  30. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    145
    Hello,
    I am trying to rotate an object in the shader as if it were a simple Transform,
    For example, I'm using the Rotate About Axis node for LocalVertexOffset.
    I duplicated the operation for LocalVertexNormal, and when I output VertexNormal to the color channel, I see the same result as if I rotated the object's Transform and output WorldSpace. This is what it should be.
    However, when I connect NormalMap, it looks terrible, as if the light falls in a very strange way. And even changing the value of the rotation angle only for LocalVertexNormal, I could not manually achieve the desired result.
    VertexOutput: absolute.
    I tried to just rotate each vertex by the transformation matrix (assigned from the script), but the result was the same.
    Please advise: how can I use NormalMap after modifying LocalVertexNormal (multiplication by transformation matrix)
    upload_2022-1-15_16-54-48.png upload_2022-1-15_16-58-9.png
    (I tried inverting the matrix but that didn't help)
    Without connecting NormalMap, no problems with normals are imperceptible

    The screenshot shows an attempt to rotate an object by 90 degrees. When rotated 180 degrees, the normals seem to be inverted (the Y channel seems to be)
    In fact, what I need in the end is to rotate the object by the matrix (from the script) and render it further as a regular Standard shader

    UPD:
    Okay, it looks like I found the problem: in addition to VertexNormal, you also need to modify VertexTangent. I added it manually to the shader and it looks like it works. But I don't understand how to set tangent value in ASE? I don't see such an output.
    Code (CSharp):
    1.             float4 ase_vertexTangent = v.tangent;
    2.             float4 appendResult67 = (ase_vertexTangent);
    3.             v.tangent = mul( MatrixInverse, appendResult67 );
     
    Last edited: Jan 15, 2022
  31. Filto

    Filto

    Joined:
    Mar 15, 2009
    Posts:
    712
    I'm getting this warning in unity 2020.3.18f1. I don't know if it is on the amplify side or unity side? The sahder seems to work fine though.
     

    Attached Files:

  32. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    You can always manipulate the Normal Unity uses internally if required; this is really specific to Unity.
    http://paste.amplify.pt/view/raw/b6120f51 (paste to canvas, simple example of World Space Projected normal, it would be incorrect without this)

    Hard to tell, do you have our editor on your project? If so there could be something else there, perhaps a something else in your project not in the correct namespace. Feel free to reach out to support@amplify.pt with an example.
     
  33. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,590
    Does the light attenuation node work in HDRP? It says you need a shadow caster pass which is on but still nothing happens?
     
  34. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    I'm afraid not, custom lighting related nodes are not supported in HDRP. Whish we could but it's a bit of a limitation, it only works with URP and Built-in(much like Shader Graph or manually coded shaders, specific to HDRP).
     
    florianalexandru05 likes this.
  35. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    798
    I have an issue in Unity 2021.2.8 and latest ASE.
    1. Create a lit shader with ASE.
    2. Create a material using this shader
    3. Assign this material to plane
    4. Create standard lit transparent material and assign it to cube and place it in front of plane
    5. Move camera away like 50 units or more
    Result: cube will disappear in the game mode. But it will stay in the scene view:
    upload_2022-1-24_14-49-54.png

    upload_2022-1-24_14-50-6.png

    if I create and assign to plane standard lit material, everything works as expected
    upload_2022-1-24_14-51-8.png

    If I import HDRP 10-11 templates everything is working as expected too.
     
  36. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hey there!

    That's interesting, we're unable to replicate it. Can you send us a sample package to support@amplify.pt for further examination?

    Scene and shaders used along with your ProjectSettings folder; or just replicate in a new project and send it over. Don't share it here, please use the support email if you do so.

    Thanks!
     
  37. ohunity

    ohunity

    Joined:
    Jan 19, 2014
    Posts:
    634
    Hi guys hope all is well.

    Having some issues on latest 2021, with the latest URP. Amplify 1.8.9 rev 33.

    In the editor (Metal) things appear fine, however on iOS Metal, seeing some very strange shader behavior on every shader made in Amplify. Normals are incorrect (shaders appear very bright), fog is not received by any of the shaders, light cookies not received.

    Any suggestions?

    Best,
     
  38. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Hey!

    That's odd, have the shaders been saved with that specific URP version? You may simply need to update them by doing so.

    Were there any significant changes to your project or is this a problem since the beginning?
     
  39. ohunity

    ohunity

    Joined:
    Jan 19, 2014
    Posts:
    634
    Edit: It is a Unity bug - https://forum.unity.com/threads/met...i_compile-combination-unity-2021-2-8.1229133/

    They were saved this the most recent version, all the shaders in question were changed recently with current versions mentioned in the previous post.

    Perhaps it could be some stripping related issues so I will look into that.
     
    Last edited: Jan 31, 2022
  40. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    798
    I've sent the reproducable project. Let me know if you have any questions.
     
    Amplify_Support likes this.
  41. Jantomet72

    Jantomet72

    Joined:
    Jan 29, 2021
    Posts:
    2
    Help: Tangent Reconstruction... I am using the build-in renderer and trying to use the World position as UV coordinates to avoid seams on ground tiles. Works fine apart from the normal maps. So I understand that I need to tweak the tangents used for the normal map to ones that work with the UVs generated from world coordinates - but how do I go about this in ASE? Right now I use the World Position X and Z as UVs - guess that I would need to construct new tangents (bitangents also?) from the World Position as well?!
    Thanx for any help in advance. And thumbs up for an awesome product.
     
  42. adamz

    adamz

    Joined:
    Jul 18, 2007
    Posts:
    1,164
    @Amplify_Ricardo @Amplify_RnD_Rick
    Im experimenting with a texture sheet. I'm able to position a texture correctly using tiling and offset (in my example). What I need to be able to do is AFTER positioning, scale it relative to it's center (see scale nodes at the bottom that's not connected). Whats the best way to do that? Thanks!

    example.jpg
     
  43. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Yeah, you need some additional calculations. Please be sure to search, I think this was discussed before.


    http://paste.amplify.pt/view/raw/b6120f51 (paste link to canvas)


    Hope the post on Discord helped; the rotator node might also help. Best discuss it there.
     
    iamarugin and Jantomet72 like this.
  44. Jantomet72

    Jantomet72

    Joined:
    Jan 29, 2021
    Posts:
    2
    Cheers :)
    Worked like a charm. Thank you. I will try and search the posts next time. Shame on Lazy me ;-).
     
    Amplify_Support likes this.
  45. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    51
    Hello,
    I am currently trying to optimise as much as I can a Universal/PBR shader we use on mobile VR (Vive Focus 3). While running some tests in a filled environment where most materials use this shader, I observed a clear difference in performances in the profiler before (1) and after (2) I unplug whatever is connected to Alpha Clip Threshold in the master node (even an int = 0).

    1.JPG 2.JPG

    Capture.JPG

    I have tried placing a keyword in between to toggle alpha clipping ON/OFF but I get the same performance drop, since there is still something (the static switch) connected to the Alpha Clip Threshold port I guess.

    Is there a way to keep the feature disabled on materials that don't use alpha testing, like if there was nothing connected to the port?
    I would like to be able to toggle Alpha clipping ON/OFF in my (custom) material inspector like for the URP/Lit shader, without this performance cost that remains when it's OFF.

    I am using Unity 2019.4.34f1 and URP 7.7.1

    By the way, when testing with a keyword I had to put a different name because _ALPHATEST_ON (used in URP/Lit shader) doesn't work at all on ASE shaders, is there a reason for this?

    Thanks in advance
     
    Last edited: Feb 1, 2022
  46. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,746
    I need a most simple wave's node example to simulate the simple water waves
     
    Last edited: Feb 4, 2022
  47. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    Hey,

    Where exactly are you placing the keyword? Not sure if we understand, _ALPHATEST_ON is not always on URP, it is set only if you have something connected to the Alpha Clip Threshold port.

    I suppose you could try to edit the template but as soon as you plug something it will be used. ASE is not really ideal for "Uber Shaders" out of the box, some work may be required on the actual template code. Feel free to follow up via support@amplify.pt for a direct discussion with the dev responsible for the template system.


    Pan a noise texture in one direction and overlay it with a reference of the first panning in a different direction. That's probably one of the simple "old school" tricks you can use.

    Something like this, but there's other ways of doing it: http://paste.amplify.pt/view/raw/89eae191 (paste link to editor)
     
    UnityLighting likes this.
  48. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    368
    I have an Amplify Shader and a Shadergraph library. I need to work on both.
    Is it possible to have both in the same project? I have been asking this for months all over the place and received no answer for any of this.
    Thanks
     
  49. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    798
    Yes, I am using both in my project and have no problems with it.
     
  50. giantkilleroverunity3d

    giantkilleroverunity3d

    Joined:
    Feb 28, 2014
    Posts:
    368
    How do you switch between the two? My shaders keep opening in ASE and I can not find how to open the shader in its respective tool?
    Thanks.
     
unityunity