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

    KenanTheFab

    Joined:
    Apr 29, 2018
    Posts:
    8
    I've been looking everywhere but I cannot find the solution ;;

    upload_2020-11-22_2-12-8.png

    I'm trying to make the feathers gradually opaque, instead of it being a simple "on or off" as displayed here. The closest I get is transparent with alpha to coverage off, but the problem with that is the entire feather turns transparent, not just the parts with an alpha cutout.

    What obvious thing am I missing?
     
  2. Amplify_Ricardo

    Amplify_Ricardo

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

    There's many ways to create something like that. Transparency is not On or Off, you can, different values can be used to achieve different results.

    What exactly do you have in mind for the gradual transparency effect?

    Hope we can help.
     
  3. KenanTheFab

    KenanTheFab

    Joined:
    Apr 29, 2018
    Posts:
    8
    Something more like the standard "fade" mode ;;. I only need the alpha of the texture removed as it is meant to be a (soft) feather, but atm it acts like a "cutout" shader, rather than fade. This is a terrible picture but this is the goal essentially. upload_2020-11-22_19-25-33.png (Soft, not hard edges)
     
  4. PolygonPros

    PolygonPros

    Joined:
    Apr 11, 2020
    Posts:
    34
    Hi, I would like to edit a camera shader asset that I purchased from the asset store. Would Amplify Shader Editor enable me to do that?

    The shader draws these paint strokes all over what the camera sees, based on the pixel info underneath. I would like to change the shapes/textures of these brush strokes, for a different painting style.



    I looked through this shader asset's files, and they are all in .cginc and .shader formats. Can Amplify Shader Editor open and edit these files? Would it be able to display what these brush shapes look like, and what the results would be if I change the math used to create them?

    I appreciate any help in pointing me in the right direction. Thank you very much!
     
  5. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    The "cutout" harshness is due to Alpha Coverage being toggled; you should be able to achieve the effect you're looking for by simply setting your Blend Mode to Transparent and plugging your alpha.

    upload_2020-11-23_10-54-37.png

    If you're going to use the Transmission/Translucency modes, be sure to provide inputs for those.


    Hey there, thanks for reaching out!

    Unfortunately, ASE can only open shaders created with the editor. Unless those have been created with ASE, it's not possible to edit them.

    I would recommend reaching out to the original developer, we provide a Template System and Node API that could enable them to create ASE compatible shader types.


    Thanks!
     
    PolygonPros likes this.
  6. KenanTheFab

    KenanTheFab

    Joined:
    Apr 29, 2018
    Posts:
    8
    upload_2020-11-23_12-2-56.png

    I am aware, but as I mentioned it makes the feathers entirely transparent, as opposed to only the alpha'd part.

    The feather area (The texture does have the "input texture alpha" selected as alpha source, as well as "alpha is transparency" ticked.)

    upload_2020-11-23_12-6-49.png

    Edit: Please ignore I am very stupid :y
     
    Last edited: Nov 23, 2020
  7. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    We'd be happy to check it, although it could always be a sorting issue.

    Can you send over the texture? (support@amplify.pt)
     
  8. PolygonPros

    PolygonPros

    Joined:
    Apr 11, 2020
    Posts:
    34
    Okay, thank you very much for your quick and clear reply.
     
  9. fherbst

    fherbst

    Joined:
    Jun 24, 2012
    Posts:
    802
    Just tested Amplify with URP 10.2 (Unity 2020.2 beta) and there's a number of issues related to both the inspector and runtime:
    • "Compile and show code" does not work in the shader inspector
    • the "shader error list" is not scrollable, seems it's stuck at the top
    • Amplify is drawing its custom inspector even for ShaderGraph shaders, which makes it hard to debug those as "Compile and show code" is thus also broken there
    • some Amplify shaders don't work on Quest (single pass instanced, GLES3) at all (tested the Vegetation Engine scene - no vegetation is rendered; shaders are Amplify Universal/PBR shaders)
    201124-142307.gif
     
  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    Thank you for reaching out, we already discussed this via Discord but I'll post it here as a reference to any other users.

    ** Attention **

    1. Alpha, Beta, Experimental, and Preview, Unity/SRP versions are not officially supported; you will definitely experience issues. Official support will be available around the same time 2020.2 is released.

    2. When using/reporting issues with 3rd-party packages made using ASE, such as Vegetation Engine, please contact the Original Developer first.

    Thanks!
     
    fherbst likes this.
  11. ArminJohansson

    ArminJohansson

    Joined:
    Jan 8, 2019
    Posts:
    14
    upload_2020-11-25_13-58-10.png
    Hi!
    I found that the texture tiling and offset fields do not apply to my shader!
    Can I solve this?
     
  12. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hi,
    Did you plug some values to that texture sample node UV input?
     
  13. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,116
    Hello there,

    Is there an ETA on HDRP10 support?
     
    LukeDawn and Passeridae like this.
  14. Amplify_Ricardo

    Amplify_Ricardo

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

    When it's officially released; we don't support Unity beta/alpha or experimental/preview content.

    That said, we've already began the process of supporting it as a Unity 2020.2 release is close.

    You can expect official support around the same time Unity gets it out there.
     
    LukeDawn and Passeridae like this.
  15. jjejj87

    jjejj87

    Joined:
    Feb 2, 2013
    Posts:
    1,116
    Thank you for the quick reply. Much appreciated.
     
    Amplify_Ricardo likes this.
  16. hoyoyo80

    hoyoyo80

    Joined:
    Jan 31, 2018
    Posts:
    58
    Hi all, im very new to amplify shader or anything shader related. My project pending due to material for polybrush to blend texture when painting yield black on mobile. Is there any ASE shader that can help me with this? Thanks
     
  17. Amplify_Ricardo

    Amplify_Ricardo

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

    You can use the Polybrush Vertex Color Painting tool with ASE and mask it as required.

    The Polybrush Texture Blend tool requires a custom shader, we don't provide a compatible one at the moment but I believe one of our users was working on creating one with ASE.
     
  18. Lowscope

    Lowscope

    Joined:
    Jun 4, 2015
    Posts:
    11
    Hello, will you guys support the new SSAO for URP in the future?
    As of now, in 2020.2 beta does have a SSAO implementation, I can get it to work with Shader Graph, but not yet with Amplify Shader Editor.
     
  19. Amplify_Ricardo

    Amplify_Ricardo

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

    Actual support for 2020.2 is still not available, this will come around the same time it's officially released as we don't support beta/alpha versions.

    Safe to assume that SSAO will work in the official release, not too far off now.
     
  20. vincentwu566

    vincentwu566

    Joined:
    Nov 22, 2020
    Posts:
    1
    Material problem.png Hi, I use the material to link to object, but when I change the color in the amplify, the material of object doest not change.
     
  21. hoyoyo80

    hoyoyo80

    Joined:
    Jan 31, 2018
    Posts:
    58
    OMG if i know this is so easy with ASE. Im using 3 textures use together with polybrush now using the link provided as example. Thanks
     
    Amplify_Ricardo likes this.
  22. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    I know BETAS are not officially supported, but I just wanted to check if anybody managed to get Amplify Shaders to work with Unity's HDRP and Raytracing?
     
  23. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Your shader is pink/magenta, that means there's an actual error here. Are you using Unity's Universal or HDRP renderer? What's on your console?

    Best to wait for official support, all users who attempted found the same issues we did.
     
  24. generalhi

    generalhi

    Joined:
    Oct 6, 2015
    Posts:
    5
    I have installed (purchased) the latest version of Amplify Shader Editor v1.8.7.012. I have a problem with instancing for the "Default Sprites" shader type. Is this a bug or am I doing something wrong?

    I have collected information and see what the problem is, but I do not know how to solve it.

    My actions:
    1) I am creating a "Default Sprites" shader.
    upload_2020-11-30_12-12-1.png

    2) Add float parameter ScaleX with type "Instanced Property".
    upload_2020-11-30_12-13-0.png

    3) I set up instancing in the script and pass the values to the shader via MaterialPropertyBlock. Instancing works well except for rasterization.

    For a while, I experimented with the graph and settings, nothing helped and I started reading the shader.
    In the generated file in the vertex shader, the ID of the instance is initialized and the value is fetched from the instance. But in the pixel shader, there is not enough line of initialization of ID of the instance, only sampling of the value.
    Code (CSharp):
    1. // Upgrade NOTE: upgraded instancing buffer 'Scale_AS' to new syntax.
    2.  
    3. // Made with Amplify Shader Editor
    4. // Available at the Unity Asset Store - http://u3d.as/y3X
    5. Shader "Scale_AS"
    6. {
    7.     Properties
    8.     {
    9.         [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
    10.         _Color ("Tint", Color) = (1,1,1,1)
    11.         [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
    12.         [PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {}
    13.         [PerRendererData]_ScaleX("ScaleX", Float) = 1
    14.         _TextureSample0("Texture Sample 0", 2D) = "white" {}
    15.  
    16.     }
    17.  
    18.     SubShader
    19.     {
    20.         LOD 0
    21.  
    22.         Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
    23.  
    24.         Cull Off
    25.         Lighting Off
    26.         ZWrite Off
    27.         Blend One OneMinusSrcAlpha
    28.      
    29.      
    30.         Pass
    31.         {
    32.         CGPROGRAM
    33.          
    34.             #pragma vertex vert
    35.             #pragma fragment frag
    36.             #pragma target 3.0
    37.             #pragma multi_compile _ PIXELSNAP_ON
    38.             #pragma multi_compile _ ETC1_EXTERNAL_ALPHA
    39.             #include "UnityCG.cginc"
    40.             #pragma multi_compile_instancing
    41.  
    42.  
    43.             struct appdata_t
    44.             {
    45.                 float4 vertex   : POSITION;
    46.                 float4 color    : COLOR;
    47.                 float2 texcoord : TEXCOORD0;
    48.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    49.              
    50.             };
    51.  
    52.             struct v2f
    53.             {
    54.                 float4 vertex   : SV_POSITION;
    55.                 fixed4 color    : COLOR;
    56.                 float2 texcoord  : TEXCOORD0;
    57.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    58.                 UNITY_VERTEX_OUTPUT_STEREO
    59.              
    60.             };
    61.          
    62.             uniform fixed4 _Color;
    63.             uniform float _EnableExternalAlpha;
    64.             uniform sampler2D _MainTex;
    65.             uniform sampler2D _AlphaTex;
    66.             uniform sampler2D _TextureSample0;
    67.             UNITY_INSTANCING_BUFFER_START(Scale_AS)
    68.                 UNITY_DEFINE_INSTANCED_PROP(float, _ScaleX)
    69. #define _ScaleX_arr Scale_AS
    70.             UNITY_INSTANCING_BUFFER_END(Scale_AS)
    71.  
    72.          
    73.             v2f vert( appdata_t IN  )
    74.             {
    75.                 v2f OUT;
    76.                 UNITY_SETUP_INSTANCE_ID(IN);
    77.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
    78.                 UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
    79.              
    80.              
    81.                 IN.vertex.xyz +=  float3(0,0,0) ;
    82.                 OUT.vertex = UnityObjectToClipPos(IN.vertex);
    83.                 OUT.texcoord = IN.texcoord;
    84.                 OUT.color = IN.color * _Color;
    85.                 #ifdef PIXELSNAP_ON
    86.                 OUT.vertex = UnityPixelSnap (OUT.vertex);
    87.                 #endif
    88.  
    89.                 return OUT;
    90.             }
    91.  
    92.             fixed4 SampleSpriteTexture (float2 uv)
    93.             {
    94.                 fixed4 color = tex2D (_MainTex, uv);
    95.  
    96. #if ETC1_EXTERNAL_ALPHA
    97.                 // get the color from an external texture (usecase: Alpha support for ETC1 on android)
    98.                 fixed4 alpha = tex2D (_AlphaTex, uv);
    99.                 color.a = lerp (color.a, alpha.r, _EnableExternalAlpha);
    100. #endif //ETC1_EXTERNAL_ALPHA
    101.  
    102.                 return color;
    103.             }
    104.          
    105.             fixed4 frag(v2f IN  ) : SV_Target
    106.             {
    107.                 float _ScaleX_Instance = UNITY_ACCESS_INSTANCED_PROP(_ScaleX_arr, _ScaleX);
    108.                 float2 texCoord4 = IN.texcoord.xy * float2( 1,1 ) + float2( 0,0 );
    109.                 float2 appendResult12 = (float2(( _ScaleX_Instance * texCoord4.x ) , texCoord4.y));
    110.              
    111.                 fixed4 c = tex2D( _TextureSample0, appendResult12 );
    112.                 c.rgb *= c.a;
    113.                 return c;
    114.             }
    115.         ENDCG
    116.         }
    117.     }
    118.     CustomEditor "ASEMaterialInspector"
    119.  
    120.  
    121. }
    If you add a line:
    UNITY_SETUP_INSTANCE_ID (IN);
    to the pixel shader then everything starts working correctly.
    upload_2020-11-30_12-16-21.png

    How can I fix this so that the shader code starts to generate correctly?
     

    Attached Files:

    Last edited: Nov 30, 2020
  25. trapazza

    trapazza

    Joined:
    Sep 3, 2012
    Posts:
    7
    Hi there, I'm new to Amplify. I've been testing some of the demo shaders and started doing some basic ones on my own but, since I installed it I'm gettting a lot of errors when trying to create a build (everything works fine from the editor though)

    Unity version: 2020.1.15f1 Personal
    Build Params: PC, Mac & Linux Standalone, Target Platform: Windows x86_64.

    This is the 1st error I get (out of 216), all coming from "Assets\Amplify\xxx"

    "Assets\AmplifyShaderEditor\Plugins\Editor\DoCreateFunction.cs(5,19): error CS0234: The type or namespace name 'ProjectWindowCallback' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)"

    Also, *after* the build fails I see this warning: upload_2020-12-1_0-38-59.png


    and then Amplify seems to reboot (Start Screen shows up).

    Any idea of what could be happening? Thanks in advance.
     
  26. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Apologies for the delay, we're going to get back to you as soon as possible.

    The developer responsible for your ticket had to take Monday off for Covid-related matters and it's a national holiday in Portugal today.


    Hello,

    This usually means that you have a conflicting script/class in your project that's not in its correct name. Meaning that the issue is not necessarily caused by ASE.

    Please Open Visual studio and try to search for "ProjectWindowCallback" to see what comes up.

    Looking forward to your reply.
     
    trapazza and generalhi like this.
  27. generalhi

    generalhi

    Joined:
    Oct 6, 2015
    Posts:
    5
    OK. I'm waiting for your answer. It stops me a lot.
     
  28. trapazza

    trapazza

    Joined:
    Sep 3, 2012
    Posts:
    7

    Hi there. I deleted and reimported all Amplify folders and the problem seems to have gone away.
    Thanks!
     
    Amplify_Ricardo likes this.
  29. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Bad news on our end, one of our main ASE developers has COVID-19. Mild for now, we're waiting for the best and a speedy recovery.

    Our response time will be slightly affected, apologies for the inconvenience.

    Stay safe!
     
  30. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    Hi!
    Do you have any ETA for the new virtual textures support?
     
  31. starfoxy

    starfoxy

    Joined:
    Apr 24, 2016
    Posts:
    184
    I am a longtime Amplify customer and believe it or not, I haven't yet used it. Shame on me! I am now taking the plunge. I would like to recreate this effect and the only reference points I have are using Unity Shader Code. Essentially its a bunch of animated gradient bars with an optional alpha channel. Bonus points if I can change the direction in which they move.



    I would like to be able to use this shader with a material that allows me to have an alpha channel so that it's not just a solid 2d square, circle, etc. Can anyone give me some direction to get started? Anything helps. I am happy to take a starting point and explore further to report back. Thanks in advance. :cool:
     
  32. jacasch

    jacasch

    Joined:
    Jan 20, 2017
    Posts:
    16
    Is there a way to have a shader (fragment) output a custom depth value. Or basically override the depth of a fragment?
    in code this is super easy with the SV_DEPTH semantic, and would allows for cool effects.
    As explained in unity docs here (https://docs.unity3d.com/Manual/SL-ShaderSemantics.html)

    The specific case where I would like to use it is that I have precomputed raymarch distances baked into a 3D texture to create a grass effect like demonstrated by Alexander Sannikov (
    )
    But to get correct intrsections with the scene I need to be able to output a custom depth per fragment.

    (I am using URP, but I guess this should work for all RP's Targeting anything above GLES 2.0)
     
  33. Amplify_Ricardo

    Amplify_Ricardo

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

    Do you mean the Graphine/Granite version? Which Unity version? It really depends, I must that I have not checked it for a while but last we checked it was still only in a preview state. We're unable to support beta/alpha, preview/experimental, Unity distributions; support for such a feature should be available around the same time as it is officially released.


    Hey there, looking forward to see what you create!

    Hard to say really, not something I have built before but perhaps someone at our Discord has built something similar. Is the original a single shader?

    Join our Discord: https://discord.gg/McYxZUE


    Not sure how this would be handled but I'll confirm with one of our devs.

    In any case, if you're using URP, and you're comfortable with shader coding, you can edit your Shader Type Template to include additional features. Check our Wiki Page for details on Shader Templates.

    upload_2020-12-7_11-6-53.png
     
  34. Yadrocinema

    Yadrocinema

    Joined:
    Jan 15, 2017
    Posts:
    8
    Hello. please tell me how to set up a stencil for the decal shader in HDRP. Thanks.
     
  35. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, there's a Decay shader type, have you tried that?
     
  36. Yadrocinema

    Yadrocinema

    Joined:
    Jan 15, 2017
    Posts:
    8
    I need to control the decal through a stencil buffer. To do this, I create an HD Decal shader. In it, I set up a stencil for checking. I insert it into the material in the decal projector. I create a quad on which I record a stencil. But stencil doesn't work. Maybe I'm setting something wrong, there are no examples of setting up a stencil in Amplify shader anywhere. How can Decay shader help me? Sorry for the Google translation.
     
  37. Amplify_Ricardo

    Amplify_Ricardo

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

    So, I'm not really sure what you need but if you can describe exactly what you need one of our developers would be happy to help.

    What kind of Stencil behavior/configuration are you looking to use?(please use specific technical details)

    And you're correct, there aren't many examples other than the built-in Stencil samples. However, Stencils are not specific to ASE, I would refer you to the available Unity documentation.
     
  38. Yadrocinema

    Yadrocinema

    Joined:
    Jan 15, 2017
    Posts:
    8
    Please tell me how to configure HDRP stencil buffer in amplify shader editor. How to configure the stencil Shader for the mask and how to configure the Shader on the object in HDRP. Thanks.
    "https://medium.com/@aarhed/stencil-shaders-98dc5af347d4"

    If possible, make a video tutorial on this topic. Many people will thank you.
     
  39. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    If we can help, we will but we need to know what you need. "How to configure HDRP Stencils" is too vague, what exactly do you need?

    Located here by the way:´
     
  40. Yadrocinema

    Yadrocinema

    Joined:
    Jan 15, 2017
    Posts:
    8

    Attached Files:

  41. cwilloughby

    cwilloughby

    Joined:
    Nov 24, 2012
    Posts:
    9
    Searching around, I'm not clear if there's support for DrawMeshInstancedIndirect yet. Is there? If so, is there an example?
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
  43. Passeridae

    Passeridae

    Joined:
    Jun 16, 2019
    Posts:
    395
    HI! I meant that one which is a former Granite, I guess. And you're right, it's still in a preview state. My bad, haven't noticed it. Though, it can be in a preview for another year or so, but not because it's unstable or anything like that, but just because they are adding new features to it, like Asset Bundle Support, which won't land until the 2021 cycle according to the development team. So, could you please at least take a look at its current state? The core of this feature is unlikely to go through heavy changes in the future. The lack of SVT support is almost the only thing that stops me from using Amplify for all my shaders:(
    Thanks!
     
  44. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey no problem! We will support it time, as soon as it's feasible.

    We actually already have some time/people allocated for it, we will be checking it again in the near future; support for this has been on our radar for some time.

    It's hard to pinpoint exactly what could change, this is the main reason we tend to stay away from Beta/Alpha/Preview/Experimental content until we're sure it's time to move in. The problem here is, from experience, if you do it too soon you will unavoidably loose work and resources.
     
  45. cwilloughby

    cwilloughby

    Joined:
    Nov 24, 2012
    Posts:
    9
  46. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    Yep, we're all waiting on 10.2.x support - seems there's some large internal changes between 8.x and 10.x that's going to mean a lot of assets need an update.
     
  47. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Should be ok on our end, provided that you're using a non-experimental/preview version; after we update, I mean.
     
    LukeDawn likes this.
  48. LukeDawn

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    404
    If you have any need of beta testers for your 10.2.x update, count me in. I can give it time immediately.
     
  49. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Thanks, much appreciated!
     
  50. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,248
    What is the latest HDRP version that ASE works in?