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.

[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. Dagos32

    Dagos32

    Joined:
    Aug 22, 2015
    Posts:
    3
    Hello! I think I have a bug happening when I enable any override in the Rendering Debugger.

    If "Debug Display" is disabled, I get an error "undeclared identifier 'input' at line..." pointing to this line:
    upload_2022-12-12_12-8-19.png

    If "Debug Display" is enabled, I get both the previous error and the warning "Ignoring duplicate keyword line 'multi_compile _ DEBUG_DISPLAY'"

    In both cases, the material turns pink when using the Rendering Debugger.

    Amplify Editor 1.9.1.2
    URP 13.1.8

    I have another project also in URP 13.1.8, but with ASE 1.9.0.2, and this problem is not present there.

    Thanks for the help!
     
  2. Summer006_unity

    Summer006_unity

    Joined:
    Jan 3, 2014
    Posts:
    5
    Hello, I have a question, can I use this to make a shader for three.js ?
    shader file in three.js looks like have different format with unity.
    can I (and how to) use this to make a shader for three.js ?
    thks
     
  3. cfantauzzo

    cfantauzzo

    Joined:
    Apr 8, 2012
    Posts:
    68
    Hi, I'm trying to figure out how to make my transparent water shader receive SSR.

    I'm using HDRP 10.8.1 and Unity 2020.3. I have "Receive SSR Transparent" enabled in the shader both in ASE and in the material properties, but it seems to have no effect at all. No SSR. Transparent materials using the default HDRP Lit shader are able to receive SSR, so I know it's my Amplify shader and not an issue with my project settings.

    I have noticed that when I tick the Receive SSR Transparent tickbox in ASE, a new output appears in the Master Node called Alpha Clip Threshold Depth Prepass. I'm sure the answer to my problem lies in this somehow, but there is no documentation or examples that I can find that show what to do with this.

    Help is appreciated.
     
  4. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    59
    Hello,
    I can't get terrain instancing to work with Amplify shaders in the URP anymore, using the last ASE version and Unity 2021.3.11f1.

    I have a quite old ASE terrain shader that worked fine until it recently stopped showing baked GI informations when the Draw Instanced option is enabled in the Terrain settings.

    I created a new Amplify shader using the last Lit template, enabled the Instanced Terrain option of the Output node and simply plugged a brown color in the Base Color port.
    With the Draw Instanced disabled in the terrain's inspector it looks fine in the scene view, but when I enable the option, I get blinking squares like this and again, no visible lightmaps:

    Draw Instanced OFF
    upload_2022-12-19_12-13-21.png

    Draw Instanced ON
    upload_2022-12-19_12-14-58.png

    Did I miss something or is this a bug ?
     

    Attached Files:

  5. John-Lisenby

    John-Lisenby

    Joined:
    Nov 8, 2013
    Posts:
    121
    Hello,

    I'm trying to create a way to display footprints when a light (flashlight) is shining on the area. I looked into the UV Light example, but it's not working as I need it to. I am currently using the footprint as a texture with alpha cutout placed on a quad. It kinda like a decal. Is there a better way to do this or a way to make changes to the UV Light Shader?

    upload_2022-12-21_13-9-56.png

    Thanks,

    John
     
  6. thecali

    thecali

    Joined:
    Jan 21, 2014
    Posts:
    10
    Hi,
    i just discovered that in Unity 2022 with Shader Graph we can create a URP > Fullscreen Shader Graph, and with that we easily can do custom postprocessing effects. Is it possible to use a similar workflow with Amplify?
     
  7. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,643
    Can I change the mode of the terrain shader to specular instead of metallic? When I did that the terrain went white. I'm trying to make a custom terrain shader and I prefer having specular to reduce the awful white fresnel by imputing the albedo color of each tile in to it, this worked on a mesh. I'm not very familiar with making terrain shaders, perhaps there's something I'm missing. Basically I just changed the shader to specular haha.
     
  8. Orangy-Tang

    Orangy-Tang

    Joined:
    Jul 24, 2013
    Posts:
    35
    Hello!

    I'm trying to do a user clip plane but *only* when a multi_compile keyword is present. At the moment I have this:



    Which works, but generates this code:

    Code (CSharp):
    1. void surf( Input i , inout SurfaceOutputStandard o )
    2. {
    3.     // ... other code ...
    4.    
    5.     float localIsClipped28 = IsClipped28( planeVector28 , worldPos28 , useWorldSpace28 );
    6.     #ifdef PORTAL_CLIP_PLANE
    7.         float staticSwitch8 = ( localIsClipped28 + 0.5 );
    8.     #else
    9.         float staticSwitch8 = 1.0;
    10.     #endif
    11.     clip( staticSwitch8 - _Cutoff );
    12. }
    As you can see, the 'clip' function is always executed, even though with PORTAL_CLIP_PLANE off, it will always pass.

    How do I move all of this calculation so that it's all wrapped in the #ifdef / #endif, so there's zero overhead when it's off?

    Thanks.
     
  9. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    59
    Faced the same issue. Looks like you can't toggle the clip() function with a keyword using ASE unless you create you own template or write your own code, which is what I ended up doing for the shader that needed such optimization.


    You can plug the same Sampler State node in several Texture Samplers, this will lower the sampler register index.
     
    Last edited: Jan 9, 2023
  10. Behind_GD

    Behind_GD

    Joined:
    Jul 31, 2021
    Posts:
    1
    Hello, I got a shader error "undeclared identifier" when trying to use custom expression



    I don't know if the information I provided is enough? I would like to know how I should fix this bug.

    Thanks!
     
  11. iamarugin

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    817
  12. darkriderdaboss

    darkriderdaboss

    Joined:
    Jan 23, 2017
    Posts:
    1
    Hello, Im trying to make a custom fullscreen vignette effect in HDRP by converting the below standard shadergraph nodes to amplify, i tried doing this on my own but im missing something. How can i get a vignette effect in amplify?
     

    Attached Files:

  13. qwerh337

    qwerh337

    Joined:
    Oct 18, 2018
    Posts:
    7
    Hello, why does the mesh become transparent when changing the position of the vertices via Local Vertex Offset?
     

    Attached Files:

  14. tomdurkin

    tomdurkin

    Joined:
    Jan 29, 2021
    Posts:
    1
    Hello, I'm having trouble getting the Lerp node to work as expected. I'm trying to use a Voronoi Noise node to lerp between a shadow color and a highlight color. I was expecting to see an image similar to the previews in the Voronoi and Power nodes, but as a gradient from my ShadowColor and HighlightColor nodes. Instead I just see a single color output.
    upload_2023-1-17_13-59-53.png

    I get a similar result trying to use the remap node:
    upload_2023-1-17_14-5-42.png

    This same methodology seems to work in ShaderGraph, but I'm trying to create this shader for the Built-In Render Pipeline.

    upload_2023-1-17_14-7-50.png

    Is there something I'm missing about implementing this correctly? Thanks in advance for any help or pointers!
     

    Attached Files:

  15. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    233
    shadow not correct when using billboard
    upload_2023-1-19_15-42-16.png
    very easy shader with only a billboard node and a texture

    upload_2023-1-19_15-44-11.png
    as you can see,there will be an empty rect area in shadow map,once the light is far from object every thing will be correct
     

    Attached Files:

  16. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    233
    upload_2023-1-19_15-45-17.png
    this is a sample that the light far from people, then the shadow has no clip
     
  17. ununion

    ununion

    Joined:
    Dec 2, 2018
    Posts:
    233
    upload_2023-1-19_15-47-0.png
    this pic is the rect clip area
     
  18. neomento

    neomento

    Joined:
    May 29, 2020
    Posts:
    2
    Is there happening any support here ? Just Checking...
     
  19. AmplifyCreations

    AmplifyCreations

    Joined:
    Aug 28, 2012
    Posts:
    31
    Hi Everyone,

    I've been having trouble keeping track of all support channels. I'll do my best to reply to some of these questions as soon as I can. Note that I've been trying to focus as much time as I can on development in order to catch up on the backlog.

    In the meantime, please direct any urgent bug reports to our support email ( support@amplify.pt ) and for tips, tricks or even basic functionality questions please hop on our community Discord ( https://discord.gg/vGvDU6Q3WR ).

    Thank you.
     
    Beauque likes this.
  20. Gullie667

    Gullie667

    Joined:
    Apr 21, 2021
    Posts:
    15
    Unity 2021.3.16f1
    Amplify 1.9.1.2
    Universal Render Pipe
    ---
    Amplify Shader --> Universal --> Lit
    Base Color RGBA
    Alpha --> Base Color's Alpha
    Alpha Clip Threshold = 0.5f
    ---
    Static Geometry casting light map shadows
    Single Texture : RGBA --> A = Opacity Stencil
    ---
    I am having trouble getting static opaque geometry with an alpha clip to actually cast a stenciled shadow into the lightmap. Currently it casts a shadow of the entire card.

    In previous versions my undocumented solution was that the Texture Sample's Property Name needed to be '_MainTex'

    For what is it worth, Shader Graph still has this issue and the fix is the same, change Property Name to '_MainTex'

    This no longer works in Amplify and the shadows cast into the light map are of the entire card, not a stencil of the alpha mask (a tree branch in this case.)

    Any ideas?

    Thanks
     
    Last edited: Jan 25, 2023
    ckohlmeyer likes this.
  21. TheLowestAnimal

    TheLowestAnimal

    Joined:
    Jun 29, 2013
    Posts:
    5
    Hi Everyone, I'm trying to use a UV Set as a mask. Is there anyway to grab just the channel data? I know we can use the texture coord or vertex UV data but that seems to drag extra information I don't need with it
     
  22. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    210
    Hi @AmplifyCreations, we have found a bug in URP Deferred shading:

    When we use an Amplify URP PBR/Lit shader, and we attach a Occlusion map to it, it does not show in the GBuffer.
    This is important because effects like MF.SSGI or SSRR depend on this. If we switch back to good-old Unity's own Lit-shader, everything works just fine.

    Can you help us out here?

    In the screenshots below you see that the SSGI and SSRR aren't blocked out. The slight decrease in darkness is caused by the AO map working on the Albedo, not the reflections / GI.

    upload_2023-1-26_11-33-25.png


    In this screenshot, we just showcase the AO map to indicate that it's there
    upload_2023-1-26_11-35-33.png


    In this screenshot I simply draw the GBuffer occlusion pass directly to the screen like this:
    Code (CSharp):
    1. col = tex2D(_GBuffer1, i.uv).a;
    upload_2023-1-26_11-29-45.png


    The shader looks as follows:
    upload_2023-1-26_11-37-53.png


    Please help us out as we want to create stunning visuals in URP using ASE. This would help us a lot! Thanks
     
  23. ravio_studio

    ravio_studio

    Joined:
    Mar 24, 2019
    Posts:
    3
    Hello, this is my first post on the unity forum! (and sorry for my english, it's not my native language ^^).

    I'm new to ASE, and I'm trying to create a cloud shader with faded edges. I managed to do it (for the moment nothing very difficult) but only for a sphere.
    SPHERE.png

    When I try on a cloud model created with blender, the inner edges also become blurred and faded, which is not really the expected result since I want to fade only the edges of the model's shilouette ^^.
    CLOUDS.png

    I understand that the problem probably comes from the fresnel node, but I am completely blocked at this level !

    Do you have any suggestions to help me? Here is my graph :
    GRAPH.png

    Thanks in advance !
     
  24. Graham-B

    Graham-B

    Joined:
    Feb 27, 2013
    Posts:
    319
    I'm trying to make a parallax shader to give in game images some depth and this is what I have so far.

    This is an example I saw posted online, which is what I'm going for.

    The lighter parts of my depth map texture should move more than the darker ones.

    Any idea what I'm doing wrong?
     
  25. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    210
    @AmplifyCreations @Amplify_Support

    Hi! Any thoughts on my previous bug report @AmplifyCreations @Amplify_Ricardo @Amplify_Support

    I found a new one:
    In the URP Decal.shader template, there is a statement that blocks the build process. So it works in editor, but we are no longer able to make builds because of it.

    As you can see the half4 normalGI is not available outside the scope of DECAL_RECONSTRUCT_NORMAL, but it is being used outside of that scope regardless.

    upload_2023-1-31_15-43-59.png

    I will fix the decal error myself, please help me with my previous post.
     
  26. Michiel-Frankfort

    Michiel-Frankfort

    Joined:
    Sep 7, 2014
    Posts:
    210

    @Amplify_Ricardo @AmplifyCreations @Amplify_Support: I fixed it like this. Would be nice if this included in your next update:
    upload_2023-1-31_15-55-22.png
     
    DEEnvironment likes this.
  27. Josh_He

    Josh_He

    Joined:
    Nov 19, 2013
    Posts:
    14
    Hi, I think I found a bug in version 1.9.1.3. At some point, I got a shader compilation error. I narrowed it down to the PolarCoordinates node and inside that to the Tau Node. The node seems to generate the shader string using:
    Code (CSharp):
    1. private readonly string Tau = ( 2.0 * Mathf.PI ).ToString();
    This lead to the output "6,28..." instead of "6.28..." because I am on a German OS setting and German language uses comma in decimal numbers.

    Interestingly, the error only popped up now, although I used the PolarCoordinates node the whole time on the same computer.
    Let my know if you need more info from me!
     
  28. NestorVG

    NestorVG

    Joined:
    Feb 12, 2019
    Posts:
    24
    There are ambient occlusion ghosts for most transparency effects

    Is there any way to solve this? I'm currently using HBAO

    upload_2023-2-4_5-37-21.png
     
  29. TrentSterling

    TrentSterling

    Joined:
    Jan 4, 2013
    Posts:
    94
    Anyone know a reason undo might not be working in the shader editor window? ctrl Z just starts undoing previous selections in unity instead of moving/undeleting nodes
     
  30. ratking

    ratking

    Joined:
    Feb 24, 2010
    Posts:
    332
    It's one of the highlights ... Screenshot_3.jpg
     
  31. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431

    yes you can turn it back on in the preference section ase
    but unity has some bugs discussed in other forums depending on unity version it may be unstable. upload_2023-2-8_8-45-29.png
     
  32. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    I was having broken shaders for a year now I was resaving and reimporting like crazy without result. Until finally I have found a video explaining how to upgrade the shaders.


    Should the "Force Template Inline Properties" be enabled by default ?
     
    Last edited: Feb 11, 2023
  33. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    Also is there a "Resave all shaders" option ?
    Resaving all amplify shaders manually is a total pain.
     
    THJSmith likes this.
  34. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431

    The issue with the old shaders was due to Unity has removed and or changed some pass names however the meta from the old shader would not clear due to it thinking it had no changes. The force inline option will force the compiler to look at the new template first in order to clean out this meta.

    Note after any inline issues are fixed from old shader the option for force inline should not be left turned on


    about resaving all shaders ase has 2 ways you can do this

    first is if you’re working with shader functions the function has an option to search dependances and then press save to compile every shader that function is found inside

    the second is ASE has a batch and save tool found in the window dropdown tab under amplify editor you can use this to select a folder and it will find all the shaders inside or under it to be compiled an saved.
     
    koirat likes this.
  35. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    But is it dangerous or just slower ?
     
  36. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431
    No its not dangerous

    just that it will aways look at the template first rather than some custom setting you're trying to change. It's not really needed after your fixed an if left on may keep defaulting some settings back to template that you're trying to change on purpose for some custom work.
     
  37. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431

    i was able to get UV light reveal working in decal from 14x an higher
    if you have gestions you would be better to ask in the ase discord

    upload_2023-2-11_10-4-5.png
     
  38. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    Unity 2021.3.11f1
    ASE 1.9.1.5

    Template shaders that comes with ASE.
    The Fabric one is the most problematic one.

     
    DEEnvironment likes this.
  39. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431

    i see what happen, some changes made are only applicable from api 13.1.8 an higher
    for info only the reference is found in ShaderPassForward.hlsl for the changes in each api about this Lit subject

    the fabric one was just overlooked nice find
     
  40. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    Would it be possible for OmniDecal shader to respect the Decal Layers in HDRP ?
    Also what are the limitations of omni decal in comparison with projectors ?
     
    Last edited: Feb 22, 2023
  41. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,643
    Can Ambient occlusion be added in a Built-in terrain shader with amplify? I couldn't find a way to do this. What I mean is, to make the mask map work in the built-in shader, not just URP, and HDRP. If not is there another way to do it?
     
    Last edited: Feb 28, 2023
  42. Yrisel

    Yrisel

    Joined:
    Dec 15, 2021
    Posts:
    10
    I'm trying to create a "clipping plane" shader, which as of now it works, the thing is, I need 2 things:
    1. "fill" the hole with a material or texture
    2. get the cut area and cut the exact same shape of another Quad that holds a texture to fit the hole
    Currently, my shader uses this to achieve the "clipping plane":
    upload_2023-2-28_15-31-21.png

    With Render Type being "Transparent"
    And Cull mode turned Off

    Working like this:
    upload_2023-2-28_15-34-51.png

    As I mentioned above, I need to fill that hole in the two ways mentioned.
    Anyone has any idea how to achieve that with Amplify?
     
  43. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    Today I attempted to create "mesh decal shader" using amplify shader.
    Here is my simple triplanar decal shader (spherical projection).

    The result is far from expected (left one inside red circle).
    The right one is HDRP/Lit shader with exactly the same structure.

    Right side of the picture is the shader structure I'm using.

     
  44. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431
    decals use "decal projectors" to render on objects.
    see Decal Projector | High Definition RP | 12.1.10 (unity3d.com)

    also note decals use different UV transforms

    #if (SHADERPASS == SHADERPASS_DBUFFER_PROJECTOR) || (SHADERPASS == SHADERPASS_FORWARD_EMISSIVE_PROJECTOR)
    float4x4 normalToWorld = UNITY_ACCESS_INSTANCED_PROP(Decal, _NormalToWorld);
    float2 scale = float2(normalToWorld[3][0], normalToWorld[3][1]);
    float2 offset = float2(normalToWorld[3][2], normalToWorld[3][3]);
    UV.xy = UV.xy * scale + offset;
    #endif
    return UV;
     
  45. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
  46. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431
    interesting i was not aware of any decal that does not use a projector component.
    do you have a link ?
     
  47. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    The info is very scarce.
    I had to experiment myself and indeed decal materials are working on a mesh.

    It is mentioned almost in the beginning of:
    https://docs.unity3d.com/Packages/com.unity.render-pipelines.high-definition@14.0/manual/Decal.html
     
    Last edited: Mar 7, 2023
  48. DEEnvironment

    DEEnvironment

    Joined:
    Dec 30, 2018
    Posts:
    431

    i suspect t issue in not rendering on the mesh correct ?
    its triplanar UVs

    for me what i did is made my own triplanar function so its all exposed to modify then improve with a swizzle
    i have not try triplaner on decal yet but would suspect it needs the UV modification i posted above for Dbuffer

    does the same setup you posted also give the same results with ase HD/Lit template on a cube?
     
  49. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    The cube on the right on my screenshot is the HDRP/Lit shader with identical graph, and it is working correctly.
    If it's what you had in mind.
     
    DEEnvironment likes this.
  50. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    1,963
    if I have got a "amplify shader function" with multiple outputs and this outputs are connected to "static switch" node will the content inside function be optimized with respect to "static switch " state ?
    Or all operations inside function are going to be run ?