Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

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

    iamarugin

    Joined:
    Dec 17, 2014
    Posts:
    889
    Shaders created in ASE will be opened in the ASE. Same for shader graph: if shader was created in the SG it should open in SG. You can not open shader created in ASE in the shader graph and vice versa.
     
  2. Beauque

    Beauque

    Joined:
    Mar 7, 2017
    Posts:
    61
    I connected a static switch (with a keyword) between my cutoff slider and the Alpha Clip Threshold port.
    By "URP/Lit" I meant not ASE's URP PBR template but Unity's UniversalRenderPipeline/Lit shader, which shows a toggle for alpha clipping in the material inspector (at least in URP 7.7.1).

    But if I understand, you meant _ALPHATEST_ON is already toggled ON in URP template depending on wether something is connected to Alpha Clip Threshold port. I guess this explains the difference observed in performances, and also why using _ALPHATEST_ON in the graph doesn't work.

    Thanks for your reply. I am not confident in shader writing but given all that, I guess modifying the template will indeed be the way to go.



    Double-clicking on the .shadergraph file in the project window, or clicking "Edit Shader" in the top-right menu in a material inspector should open your SG shader with SG. The "Open in Shader Editor" button is for ASE shaders only.
     
    Last edited: Feb 7, 2022
    Amplify_Support likes this.
  3. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    What Beauque said, different buttons for each but double-clicking should do the trick.

    What shaders keep opening on ASE specificaly, Shader Graph shaders(different icon) or regular(coded) shaders? Please be specific so we can understand what you have on your end.
     
  4. ColtonRamos

    ColtonRamos

    Joined:
    Nov 4, 2015
    Posts:
    15
    Hi there,

    I have a shader I wrote based off of the "UISpriteFX" example. My shader is supposed to be used to make an animated health bar, so the shader is applied to images on a canvas.

    It works well on Windows, but when I was doing testing in Ubuntu (OpenGL Core) it doesn't seem to render; the health bar doesn't show up. Are there any tips / dos & don'ts for writing shaders for multiple platforms with Amplify? Or, perhaps dos & don'ts for writing shaders for UI?

    Here's my healthbar shader:
    Code (CSharp):
    1. // Made with Amplify Shader Editor
    2. // Available at the Unity Asset Store - http://u3d.as/y3X
    3. Shader "ColtonRamos/Healthbar"
    4. {
    5.     Properties
    6.     {
    7.         [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
    8.         _Color ("Tint", Color) = (1,1,1,1)
    9.         [MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
    10.         [PerRendererData] _AlphaTex ("External Alpha", 2D) = "white" {}
    11.         _Cloud1("Cloud1", 2D) = "white" {}
    12.         _Cloud2("Cloud2", 2D) = "white" {}
    13.         _XWave1("XWave1", Range( -1 , 1)) = 0.1
    14.         _XWave2("XWave2", Range( -1 , 1)) = 0
    15.         _XWave3("XWave3", Range( -1 , 1)) = -0.25
    16.         _Cloud1Brightness("Cloud1Brightness", Range( 0 , 5)) = 0.25
    17.         _Cloud2Brightness("Cloud2Brightness", Range( 0 , 5)) = 0.25
    18.         _YWave1("YWave1", Range( -1 , 1)) = 0
    19.         _YWave2("YWave2", Range( -1 , 1)) = 0.1
    20.         _YWave3("YWave3", Range( -1 , 1)) = -0.25
    21.         _ExtraNoiseBrightness("ExtraNoiseBrightness", Range( 0 , 1)) = 0.25
    22.         _ImageBrightness("ImageBrightness", Range( 0 , 1)) = 0.5
    23.         _Scale("Scale", Range( 0 , 100)) = 1
    24.         [HideInInspector] _texcoord( "", 2D ) = "white" {}
    25.  
    26.     }
    27.  
    28.     SubShader
    29.     {
    30.         LOD 0
    31.  
    32.         Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "PreviewType"="Plane" "CanUseSpriteAtlas"="True" }
    33.  
    34.         Cull Off
    35.         Lighting Off
    36.         ZWrite Off
    37.         Blend One OneMinusSrcAlpha
    38.      
    39.      
    40.         Pass
    41.         {
    42.         CGPROGRAM
    43.          
    44.             #pragma vertex vert
    45.             #pragma fragment frag
    46.             #pragma target 3.0
    47.             #pragma multi_compile _ PIXELSNAP_ON
    48.             #pragma multi_compile _ ETC1_EXTERNAL_ALPHA
    49.             #include "UnityCG.cginc"
    50.             #include "UnityShaderVariables.cginc"
    51.             #define ASE_NEEDS_FRAG_POSITION
    52.  
    53.  
    54.             struct appdata_t
    55.             {
    56.                 float4 vertex   : POSITION;
    57.                 float4 color    : COLOR;
    58.                 float2 texcoord : TEXCOORD0;
    59.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    60.              
    61.             };
    62.  
    63.             struct v2f
    64.             {
    65.                 float4 vertex   : SV_POSITION;
    66.                 fixed4 color    : COLOR;
    67.                 float2 texcoord  : TEXCOORD0;
    68.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    69.                 UNITY_VERTEX_OUTPUT_STEREO
    70.                 float4 ase_texcoord1 : TEXCOORD1;
    71.             };
    72.          
    73.             uniform fixed4 _Color;
    74.             uniform float _EnableExternalAlpha;
    75.             uniform sampler2D _MainTex;
    76.             uniform sampler2D _AlphaTex;
    77.             uniform sampler2D _Cloud2;
    78.             uniform float _Scale;
    79.             uniform float _XWave2;
    80.             uniform float _YWave2;
    81.             uniform float _Cloud2Brightness;
    82.             uniform float4 _MainTex_ST;
    83.             uniform sampler2D _Cloud1;
    84.             uniform float _XWave1;
    85.             uniform float _YWave1;
    86.             uniform float _Cloud1Brightness;
    87.             uniform float _ImageBrightness;
    88.             uniform float _XWave3;
    89.             uniform float _YWave3;
    90.             uniform float _ExtraNoiseBrightness;
    91.             float3 mod2D289( float3 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
    92.             float2 mod2D289( float2 x ) { return x - floor( x * ( 1.0 / 289.0 ) ) * 289.0; }
    93.             float3 permute( float3 x ) { return mod2D289( ( ( x * 34.0 ) + 1.0 ) * x ); }
    94.             float snoise( float2 v )
    95.             {
    96.                 const float4 C = float4( 0.211324865405187, 0.366025403784439, -0.577350269189626, 0.024390243902439 );
    97.                 float2 i = floor( v + dot( v, C.yy ) );
    98.                 float2 x0 = v - i + dot( i, C.xx );
    99.                 float2 i1;
    100.                 i1 = ( x0.x > x0.y ) ? float2( 1.0, 0.0 ) : float2( 0.0, 1.0 );
    101.                 float4 x12 = x0.xyxy + C.xxzz;
    102.                 x12.xy -= i1;
    103.                 i = mod2D289( i );
    104.                 float3 p = permute( permute( i.y + float3( 0.0, i1.y, 1.0 ) ) + i.x + float3( 0.0, i1.x, 1.0 ) );
    105.                 float3 m = max( 0.5 - float3( dot( x0, x0 ), dot( x12.xy, x12.xy ), dot( x12.zw, x12.zw ) ), 0.0 );
    106.                 m = m * m;
    107.                 m = m * m;
    108.                 float3 x = 2.0 * frac( p * C.www ) - 1.0;
    109.                 float3 h = abs( x ) - 0.5;
    110.                 float3 ox = floor( x + 0.5 );
    111.                 float3 a0 = x - ox;
    112.                 m *= 1.79284291400159 - 0.85373472095314 * ( a0 * a0 + h * h );
    113.                 float3 g;
    114.                 g.x = a0.x * x0.x + h.x * x0.y;
    115.                 g.yz = a0.yz * x12.xz + h.yz * x12.yw;
    116.                 return 130.0 * dot( m, g );
    117.             }
    118.          
    119.  
    120.          
    121.             v2f vert( appdata_t IN  )
    122.             {
    123.                 v2f OUT;
    124.                 UNITY_SETUP_INSTANCE_ID(IN);
    125.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(OUT);
    126.                 UNITY_TRANSFER_INSTANCE_ID(IN, OUT);
    127.                 OUT.ase_texcoord1 = IN.vertex;
    128.              
    129.                 IN.vertex.xyz +=  float3(0,0,0) ;
    130.                 OUT.vertex = UnityObjectToClipPos(IN.vertex);
    131.                 OUT.texcoord = IN.texcoord;
    132.                 OUT.color = IN.color * _Color;
    133.                 #ifdef PIXELSNAP_ON
    134.                 OUT.vertex = UnityPixelSnap (OUT.vertex);
    135.                 #endif
    136.  
    137.                 return OUT;
    138.             }
    139.  
    140.             fixed4 SampleSpriteTexture (float2 uv)
    141.             {
    142.                 fixed4 color = tex2D (_MainTex, uv);
    143.  
    144. #if ETC1_EXTERNAL_ALPHA
    145.                 // get the color from an external texture (usecase: Alpha support for ETC1 on android)
    146.                 fixed4 alpha = tex2D (_AlphaTex, uv);
    147.                 color.a = lerp (color.a, alpha.r, _EnableExternalAlpha);
    148. #endif //ETC1_EXTERNAL_ALPHA
    149.  
    150.                 return color;
    151.             }
    152.          
    153.             fixed4 frag(v2f IN  ) : SV_Target
    154.             {
    155.                 float3 temp_output_835_0 = ( _Scale * IN.ase_texcoord1.xyz );
    156.                 float temp_output_836_0 = (temp_output_835_0).x;
    157.                 float mulTime795 = _Time.y * _XWave2;
    158.                 float temp_output_837_0 = (temp_output_835_0).y;
    159.                 float mulTime796 = _Time.y * _YWave2;
    160.                 float2 appendResult800 = (float2(( temp_output_836_0 + mulTime795 ) , ( temp_output_837_0 + mulTime796 )));
    161.                 float2 uv_MainTex = IN.texcoord.xy * _MainTex_ST.xy + _MainTex_ST.zw;
    162.                 float4 temp_output_529_0 = ( tex2D( _MainTex, uv_MainTex ) * _Color );
    163.                 float mulTime781 = _Time.y * _XWave1;
    164.                 float mulTime790 = _Time.y * _YWave1;
    165.                 float2 appendResult788 = (float2(( temp_output_836_0 + mulTime781 ) , ( temp_output_837_0 + mulTime790 )));
    166.                 float mulTime827 = _Time.y * _XWave3;
    167.                 float mulTime826 = _Time.y * _YWave3;
    168.                 float2 appendResult830 = (float2(( temp_output_836_0 + mulTime827 ) , ( temp_output_837_0 + mulTime826 )));
    169.                 float simplePerlin2D816 = snoise( appendResult830 );
    170.                 simplePerlin2D816 = simplePerlin2D816*0.5 + 0.5;
    171.              
    172.                 fixed4 c = ( ( ( tex2D( _Cloud2, appendResult800 ) * _Cloud2Brightness ) * temp_output_529_0 ) + ( ( tex2D( _Cloud1, appendResult788 ) * _Cloud1Brightness ) * temp_output_529_0 ) + ( temp_output_529_0 * _ImageBrightness ) + ( ( simplePerlin2D816 * _ExtraNoiseBrightness ) * temp_output_529_0 ) );
    173.                 c.rgb *= c.a;
    174.                 return c;
    175.             }
    176.         ENDCG
    177.         }
    178.     }
    179.  
    180.  
    181.  
    182. }
    183. /*ASEBEGIN
    184. Version=18707
    185. -1280;42;1280;957;5926.562;896.2985;1.898878;True;False
    186. Node;AmplifyShaderEditor.RangedFloatNode;834;-6060.955,-3243.905;Inherit;False;Property;_Scale;Scale;12;0;Create;True;0;0;False;0;False;1;0.1;0;100;0;1;FLOAT;0
    187. Node;AmplifyShaderEditor.PosVertexDataNode;833;-5964.004,-3144.504;Inherit;False;0;0;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    188. Node;AmplifyShaderEditor.RangedFloatNode;789;-6227.395,-1215.756;Inherit;False;Property;_YWave1;YWave1;7;0;Create;True;0;0;False;0;False;0;0;-1;1;0;1;FLOAT;0
    189. Node;AmplifyShaderEditor.RangedFloatNode;793;-6225.769,-2046.288;Inherit;False;Property;_YWave2;YWave2;8;0;Create;True;0;0;False;0;False;0.1;0;-1;1;0;1;FLOAT;0
    190. Node;AmplifyShaderEditor.RangedFloatNode;794;-6223.965,-2149.188;Inherit;False;Property;_XWave2;XWave2;3;0;Create;True;0;0;False;0;False;0;0;-1;1;0;1;FLOAT;0
    191. Node;AmplifyShaderEditor.RangedFloatNode;823;-5201.254,-2602.091;Inherit;False;Property;_XWave3;XWave3;4;0;Create;True;0;0;False;0;False;-0.25;0;-1;1;0;1;FLOAT;0
    192. Node;AmplifyShaderEditor.RangedFloatNode;824;-5202.058,-2499.191;Inherit;False;Property;_YWave3;YWave3;9;0;Create;True;0;0;False;0;False;-0.25;0;-1;1;0;1;FLOAT;0
    193. Node;AmplifyShaderEditor.RangedFloatNode;787;-6225.592,-1318.656;Inherit;False;Property;_XWave1;XWave1;2;0;Create;True;0;0;False;0;False;0.1;0;-1;1;0;1;FLOAT;0
    194. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;835;-5718.427,-3227.182;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
    195. Node;AmplifyShaderEditor.ComponentMaskNode;837;-5516.043,-3120.039;Inherit;False;False;True;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT;0
    196. Node;AmplifyShaderEditor.SimpleTimeNode;827;-4876.558,-2587.691;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
    197. Node;AmplifyShaderEditor.SimpleTimeNode;781;-5900.895,-1304.256;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
    198. Node;AmplifyShaderEditor.SimpleTimeNode;795;-5899.269,-2134.788;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
    199. Node;AmplifyShaderEditor.ComponentMaskNode;836;-5519.78,-3218.727;Inherit;False;True;False;False;False;1;0;FLOAT3;0,0,0;False;1;FLOAT;0
    200. Node;AmplifyShaderEditor.SimpleTimeNode;790;-5898.395,-1198.756;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
    201. Node;AmplifyShaderEditor.SimpleTimeNode;796;-5896.769,-2029.288;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
    202. Node;AmplifyShaderEditor.SimpleTimeNode;826;-4874.058,-2482.191;Inherit;False;1;0;FLOAT;1;False;1;FLOAT;0
    203. Node;AmplifyShaderEditor.SimpleAddOpNode;828;-4651.558,-2481.691;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    204. Node;AmplifyShaderEditor.SimpleAddOpNode;799;-5674.269,-2028.788;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    205. Node;AmplifyShaderEditor.SimpleAddOpNode;785;-5675.895,-1198.256;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    206. Node;AmplifyShaderEditor.SimpleAddOpNode;829;-4657.558,-2630.691;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    207. Node;AmplifyShaderEditor.CommentaryNode;534;-6118.536,-986.7712;Inherit;False;849.0742;480.2428;Comment;4;529;476;528;477;Base Sprite;1,1,1,1;0;0
    208. Node;AmplifyShaderEditor.SimpleAddOpNode;798;-5680.269,-2177.788;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    209. Node;AmplifyShaderEditor.SimpleAddOpNode;784;-5681.895,-1347.256;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    210. Node;AmplifyShaderEditor.DynamicAppendNode;830;-4507.227,-2613.169;Inherit;True;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
    211. Node;AmplifyShaderEditor.TemplateShaderPropertyNode;477;-6091.057,-930.9922;Inherit;True;0;0;_MainTex;Shader;False;0;5;SAMPLER2D;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    212. Node;AmplifyShaderEditor.DynamicAppendNode;788;-5485.895,-1292.256;Inherit;True;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
    213. Node;AmplifyShaderEditor.DynamicAppendNode;800;-5484.269,-2122.788;Inherit;True;FLOAT2;4;0;FLOAT;0;False;1;FLOAT;0;False;2;FLOAT;0;False;3;FLOAT;0;False;1;FLOAT2;0
    214. Node;AmplifyShaderEditor.RangedFloatNode;818;-4207.87,-2512.969;Inherit;False;Property;_ExtraNoiseBrightness;ExtraNoiseBrightness;10;0;Create;True;0;0;False;0;False;0.25;0.25;0;1;0;1;FLOAT;0
    215. Node;AmplifyShaderEditor.SamplerNode;778;-5239.396,-1313.956;Inherit;True;Property;_Cloud1;Cloud1;0;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    216. Node;AmplifyShaderEditor.SamplerNode;528;-5835.057,-930.9922;Inherit;True;Property;_TextureSample4;Texture Sample 4;26;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    217. Node;AmplifyShaderEditor.TemplateShaderPropertyNode;476;-5723.057,-706.9918;Inherit;False;0;0;_Color;Shader;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    218. Node;AmplifyShaderEditor.RangedFloatNode;791;-5228.467,-1084.009;Inherit;False;Property;_Cloud1Brightness;Cloud1Brightness;5;0;Create;True;0;0;False;0;False;0.25;0.1;0;5;0;1;FLOAT;0
    219. Node;AmplifyShaderEditor.RangedFloatNode;810;-5228.532,-1853.215;Inherit;False;Property;_Cloud2Brightness;Cloud2Brightness;6;0;Create;True;0;0;False;0;False;0.25;0.1;0;5;0;1;FLOAT;0
    220. Node;AmplifyShaderEditor.SamplerNode;801;-5244.269,-2093.788;Inherit;True;Property;_Cloud2;Cloud2;1;0;Create;True;0;0;False;0;False;-1;None;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    221. Node;AmplifyShaderEditor.NoiseGeneratorNode;816;-4115.625,-2641.456;Inherit;False;Simplex2D;True;False;2;0;FLOAT2;0,0;False;1;FLOAT;1;False;1;FLOAT;0
    222. Node;AmplifyShaderEditor.RangedFloatNode;808;-5180.578,-644.4316;Inherit;False;Property;_ImageBrightness;ImageBrightness;11;0;Create;True;0;0;False;0;False;0.5;0.5;0;1;0;1;FLOAT;0
    223. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;779;-4863.995,-1100.757;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
    224. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;819;-3850.276,-2540.414;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
    225. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;811;-4866.066,-1930.596;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
    226. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;529;-5438.77,-914.9711;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
    227. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;806;-4855.569,-941.7826;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
    228. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;813;-4896.611,-1741.216;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
    229. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;807;-4868.579,-667.8312;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
    230. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;822;-4052.086,-2331.402;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
    231. Node;AmplifyShaderEditor.RangedFloatNode;838;-4366.203,-454.869;Inherit;False;Property;_Stencil;_Stencil;13;0;Create;True;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
    232. Node;AmplifyShaderEditor.RangedFloatNode;841;-4380.731,-36.54166;Inherit;True;Property;_StencilWriteMask;_StencilWriteMask;16;0;Create;True;0;0;False;0;False;255;0;0;0;0;1;FLOAT;0
    233. Node;AmplifyShaderEditor.TexCoordVertexDataNode;783;-5983.895,-1531.256;Inherit;False;0;2;0;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    234. Node;AmplifyShaderEditor.SimpleAddOpNode;804;-4088.3,-1468.665;Inherit;True;4;4;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;COLOR;0,0,0,0;False;3;COLOR;0,0,0,0;False;1;COLOR;0
    235. Node;AmplifyShaderEditor.TexCoordVertexDataNode;797;-5982.269,-2361.788;Inherit;False;0;2;0;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    236. Node;AmplifyShaderEditor.TexCoordVertexDataNode;825;-4959.558,-2814.691;Inherit;False;0;2;0;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
    237. Node;AmplifyShaderEditor.RangedFloatNode;839;-4377.825,-356.0973;Inherit;False;Property;_StencilComp;_StencilComp;14;0;Create;True;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
    238. Node;AmplifyShaderEditor.RangedFloatNode;840;-4372.016,-266.0407;Inherit;True;Property;_StencilOp;_StencilOp;15;0;Create;True;0;0;False;0;False;0;0;0;0;0;1;FLOAT;0
    239. Node;AmplifyShaderEditor.RangedFloatNode;842;-4380.734,187.1474;Inherit;True;Property;_StencilReadMask;_StencilReadMask;17;0;Create;True;0;0;False;0;False;255;0;0;0;0;1;FLOAT;0
    240. Node;AmplifyShaderEditor.TemplateMultiPassMasterNode;728;-3765.305,-1034.986;Float;False;True;-1;2;;0;6;ColtonRamos/Healthbar;0f8ba0101102bb14ebf021ddadce9b49;True;SubShader 0 Pass 0;0;0;;2;True;3;1;False;-1;10;False;-1;0;1;False;-1;0;False;-1;False;False;False;False;False;False;False;False;True;2;False;-1;False;False;False;False;False;True;2;False;-1;False;False;True;5;Queue=Transparent=Queue=0;IgnoreProjector=True;RenderType=Transparent=RenderType;PreviewType=Plane;CanUseSpriteAtlas=True;False;0;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;True;2;0;;0;0;Standard;0;0;1;True;False;;False;0
    241. WireConnection;835;0;834;0
    242. WireConnection;835;1;833;0
    243. WireConnection;837;0;835;0
    244. WireConnection;827;0;823;0
    245. WireConnection;781;0;787;0
    246. WireConnection;795;0;794;0
    247. WireConnection;836;0;835;0
    248. WireConnection;790;0;789;0
    249. WireConnection;796;0;793;0
    250. WireConnection;826;0;824;0
    251. WireConnection;828;0;837;0
    252. WireConnection;828;1;826;0
    253. WireConnection;799;0;837;0
    254. WireConnection;799;1;796;0
    255. WireConnection;785;0;837;0
    256. WireConnection;785;1;790;0
    257. WireConnection;829;0;836;0
    258. WireConnection;829;1;827;0
    259. WireConnection;798;0;836;0
    260. WireConnection;798;1;795;0
    261. WireConnection;784;0;836;0
    262. WireConnection;784;1;781;0
    263. WireConnection;830;0;829;0
    264. WireConnection;830;1;828;0
    265. WireConnection;788;0;784;0
    266. WireConnection;788;1;785;0
    267. WireConnection;800;0;798;0
    268. WireConnection;800;1;799;0
    269. WireConnection;778;1;788;0
    270. WireConnection;528;0;477;0
    271. WireConnection;801;1;800;0
    272. WireConnection;816;0;830;0
    273. WireConnection;779;0;778;0
    274. WireConnection;779;1;791;0
    275. WireConnection;819;0;816;0
    276. WireConnection;819;1;818;0
    277. WireConnection;811;0;801;0
    278. WireConnection;811;1;810;0
    279. WireConnection;529;0;528;0
    280. WireConnection;529;1;476;0
    281. WireConnection;806;0;779;0
    282. WireConnection;806;1;529;0
    283. WireConnection;813;0;811;0
    284. WireConnection;813;1;529;0
    285. WireConnection;807;0;529;0
    286. WireConnection;807;1;808;0
    287. WireConnection;822;0;819;0
    288. WireConnection;822;1;529;0
    289. WireConnection;804;0;813;0
    290. WireConnection;804;1;806;0
    291. WireConnection;804;2;807;0
    292. WireConnection;804;3;822;0
    293. WireConnection;728;0;804;0
    294. ASEEND*/
    295. //CHKSM=22C33B047AB0F10E14A7D7857C1902178C0C0D03
     
    Last edited: Feb 9, 2022
  5. ColtonRamos

    ColtonRamos

    Joined:
    Nov 4, 2015
    Posts:
    15
    Ok I just wanna report back on what I got working

    My shader was made with a template named something like "Legacy/Sprite". I needed to use the template "Legacy/Ui"
     
  6. Dajokn

    Dajokn

    Joined:
    Dec 24, 2018
    Posts:
    9
    I'm looking for a copy of Amplify Texture 2, bought Amplify Editor thinking maybe it was included, I can't find it on the asset store.
     
  7. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    446
    "Support for Post-Processing Stack shaders"

    Does this imply that this asset can make shaders for the post processing stack? I want to make a few custom screen effects utilizing PP.
     
  8. Mauri

    Mauri

    Joined:
    Dec 9, 2010
    Posts:
    2,670
    Their website here says "Public licensing temporarily suspended".

    Yep: http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Post_Processing_Stack
     
    Last edited: Feb 10, 2022
  9. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    Cool, thanks for lettings un know.

    As @Mauri mentioned, it's no longer available for licensing, it's only maintained for existing costumers.

    I would just add that you can only create Post Processing Stack effects for the Built-in renderer, URP and HDRP don't currently support PPS shader creation.
     
  10. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    438
    Hi there!
    In builtIn examples to ASE there is example called "StencilExample". I need to do such effect in HDRP. Can someone help me to show how to create it?
    Tried to search forum, but failed with creation =(
     
  11. Doomchecker

    Doomchecker

    Joined:
    Apr 5, 2021
    Posts:
    112
    Hi there,
    I'm so glad you guys published the Shader Pack, thanks for that!

    Nevertheless I have some starting problems with it. Basically I can't get any of them to work :(

    Here is a mesh with the standard URP Simple Lit material and an albedo map inside:
    upload_2022-2-14_13-3-50.png

    Here for example I'm using animated fire shaded function with the default settings:
    upload_2022-2-14_13-5-47.png

    Ok so I tried figuring out what is wrong here step step and finally I only had the albedo map going into the shader with the result it looks like this:

    upload_2022-2-14_13-8-3.png
    upload_2022-2-14_13-8-38.png

    I tried this with multiple other of the shaders, I can't get it to look normal.
    There is probably a very simple solution I am maybe missing?

    Thanks a lot for helping out!
     
  12. XiongmaoHZH

    XiongmaoHZH

    Joined:
    Dec 21, 2021
    Posts:
    8
    How can I export the surface options in the editor to the material panel
     

    Attached Files:

  13. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,850
    I have a strange issue when using light direction. I'm not sure that is what's causing it but it's related. I made a fake translucency shader using world space light direction and every time I add a point light in the scene my entire vegetation glows and glitches. This happens despite any distance I put it in the scene and it doesn't really seem to be working with point lights at all, only sun or directional lights. Any clue why this is happening? Is there a way to turn off the point lights on the light direction node?
     

    Attached Files:

  14. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    I'm afraid HDRP already uses stencils internally, could be tricky to set it up; I would refer you to this thread for additional details. https://forum.unity.com/threads/hdrp-stencil-ref-and-stencil-buffer.923960

    Something very odd happening there but I think it could be related to project/URP setup.

    What Unity version are you using?
    Is a simple new shader with a Texture Sample on albedo not working? (make sure the texture is set in the material)

    Looking forward to any additional details.


    Two things come to mind, you either need to handle Attenuation(with the node) or filter it like we do in our "UV Light Reveal" sample. We'd be happy to examine a sample shader. (posted here or via support@amplify.pt)
     
  15. dizzymediainc

    dizzymediainc

    Joined:
    Apr 6, 2014
    Posts:
    446
    That's fine, i only need it for standard/built in, so awesome :)
     
    Amplify_Support likes this.
  16. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,850
    Thanks for the quick reply. It looks like the only way to do it for me in built-in is custom light. Not sure if I'll bother since URP light attenuation and HDRP translucency already work fine so I'll just add a forward version of the shader for now. Maybe later I'll make a custom light shader version.
     
    Amplify_Support likes this.
  17. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    Is Triplanar Projection shader from amplify shader pack not supporting texture tilling ?
    As I see it right now Texture tiling and offset values are ignored and I don't see any other way to set the scale or shift of textures.
     
  18. Kevin-VFX

    Kevin-VFX

    Joined:
    Apr 17, 2016
    Posts:
    54
    Hey, reporting a bug here:

    In the URP PBR template, you are redefining the _DepthValue in the CoatSmoothness. This links the two properties and breaks the depth writing fictionality.

    upload_2022-2-17_12-24-40.png
     
  19. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Please elaborate on your current issue, you can tile and offset.

    Thanks for heads up!

    As far as I know, our template replicates what SG does so we might be "copying" something that we shouldn't.

    What Unity, ASE, and URP version is this?
     
  20. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    So there is material called TriplanarProjection, on it there is TriplanarAlbedo texture with tiling and offset.
    When I'm changing tiling or offset nothing changes.

    Also I would like to ask how can I get this values in shader I'm talking about Texture tilling and offset values.
     
  21. Kevin-VFX

    Kevin-VFX

    Joined:
    Apr 17, 2016
    Posts:
    54
    Unity 2021.2.11f
    Amplify Editor 1.8.9r35
    URP 12.1 (customized)
     
  22. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    Unity 2021.2.11f1
    Please take a look at this picture.
    It is a triplanar shader, when I use it on my rocks I have some problems.
    But when I use some standard unity materials I don't have this bugs.

    On the left bottom side there is a little picture from game view, as you can see there is a tree with the eye but there are some white spots. This are from rocks behind the tree. There are also some black spots on the bottom of the tree, this are also from the rocks.

    Also I have noticed some additional shadow gliches when using this shader.

     
  23. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    Once again me, I have even simpler material just albedo normal and color and the bug is present.
    unity 2021.2.11
    HDRP 12.1.4
     
  24. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    I'm sure we can help but we need to understand what you have on your end.

    "I have even simpler material just albedo normal and color and the bug is present."
    What shader type, show me what you see on your scene. Is it pink? If so, select the shader, what's the error on the inspector tab?


    Regarding the actual triplanar shader sample, I'm assuming you saved it to update it to your current HDRP version, best to figure out first what's happening. If a simple shader is not working as expected there's definitely a bigger problem here.

    Regarding your previous question about tiling, you have to tell us exactly what value you're altering because if it's the Texture Sample Offset/Tile, that stops controlling it as soon as you start adjusting the UV parameters via custom properties.


    Thanks!

    Did you confirm if SG does not do the same?

    We'll pass this on to the devs.
     
  25. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    I have no errors on my shader.
    Everything is in my previous post, there is a picture with shader, and a screen from game.
    The screen from game is small because this bugs appear in some distance.
     
  26. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    "Once again me, I have even simpler material just albedo normal and color and the bug is present."

    What is the bug?? Something happening somewhere is very vague, we'd be happy to examine a sample.
     
  27. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    Do you see my picture. Look at this small rectangle, it is a game screenshot. See this white bright spots in the middle of it. This are stones with shader made with ASE, they are behind the tree, but are making bugs in front of it.

    I have installed newest ASE and created this shader, do I have to do some preparations with ASE to make it work in SRP 12.1.4 ?
     
  28. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    I'm sorry but that information is not sufficient to debug the actual issue, hence the request for a sample. (to support@amplify.pt)

    What we can do on our side is run a few tests of our own, which we will with 12.1.4, to see if we can spot anything.

    We'll get back to you as soon as we are able to check it out, until then, please consider sending a simple example to our email. (shaders, scene)
     
  29. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    I will try to do it, I'm not promising instant effort because of the weekend.
    I'm attaching better image of the issue.
    On the left ASE shader on the right SG shader. (SG shader dont have bugs)
     
  30. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Great, if you can send us SG and ASE, we can compare it.
     
  31. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    But this are are not the same effects, just wanted to test if SG shader is having this bug, so I slapped together some shader with triplanar node inside.

    Generally I was using ASE because SG was lacking in functionality.
    I think the problem may be in HD/Lit in ASE

    Do you still want me to send you this meaningless SG shader ?
     
  32. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    We have no way of knowing without actually testing the same conditions.

    Tell me this, does a new ASE shader with just a texture applied to the albedo have the same problem? New file/shader. If so there's likely something else here that we need to figure out.
     
  33. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    I will allow to quote myself ;)
    And I created one more shader I just connected color with HD\Lit and nothing more.
    And the bug is present.
     
  34. Jayme65

    Jayme65

    Joined:
    Dec 11, 2016
    Posts:
    94
    Auto Texture Tiling
    I would like the tiling to adapt to the object size...could you please tell what would be your recommendation to achieve this with ASE, please?
     
  35. Chris_Payne_QS

    Chris_Payne_QS

    Joined:
    Jul 16, 2016
    Posts:
    86
    Having some trouble with the View Dir node - I'm attempting to pull some geometry towards the camera. Scaling the Worldspace View Dir and applying it to the Vertex Offset works, but it moves the geometry in the wrong direction - and it changes as the skinned mesh animates, as if the bone deformations are applied after the ASE shader. (I'm on URP 7.3.1 and ASE 1.8.7.007)

    What's wrong here?
    upload_2022-2-19_23-18-43.png

    [EDIT] Further tests - using a fixed vector instead offsets the geometry in object space (but still before skinning), is that the intended behaviour for Vertex Offset? There's no tooltip and I can't find it in the docs.
     
    Last edited: Feb 19, 2022
  36. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Hello!

    I'm encountering a bug? Using Texel Size node makes shader SRP Batcher incompatible with a message saying "Material property found in another cbuffer that "UnityPerMaterial"(_MyTexture_TexelSize)"

    While my previous experience with using UNITY_VERTEX_INPUT_INSTANCE_ID in shaderlab says it doesn't break SRP Batcher, looks like ASE does something here in a weird manner?
     
  37. bustedbunny2

    bustedbunny2

    Joined:
    Oct 27, 2021
    Posts:
    25
    Is instanced property supported by URP?
    Every time I try to add any isntanced Property to any URP template - shaders won't compile.
     
  38. florianalexandru05

    florianalexandru05

    Joined:
    Mar 31, 2014
    Posts:
    1,850
    Does having a billboard node turn off the GPU instancing in the HDRP or URP shader? Does this affect DOTS instancing and what's the difference between DTOS and GPU? Do you recommend having it checked on, it is off by default? From what I understand DOTS is a hybrid of sorts?
     
  39. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Is there a URP SimpleLit node somewhere? I couldn't find it, only lit, but the way they render specular reflections is visually very different
     
  40. Kevin-VFX

    Kevin-VFX

    Joined:
    Apr 17, 2016
    Posts:
    54
    I do not believe that SG even has the capability of writing depth. So no, it doesn't behave the same way.
     
  41. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Sorry, seems good over here.(same versions)

    Can you prepare a sample scene? (just some basic objects, as long the issue is present)

    upload_2022-2-21_23-21-36.png


    Check the ScaleIndependentTile sample as a starting point; note that this breaks with Batchting.

    Your first step should be to update ASE and re-save your shaders, 1.8.7.007 is quite old.

    URP 7.3.1 is not recommend, it's full of issues, consider upgrading if you can.

    There's no tooltip, this is specific to Unity(comparable to shader graph), you can also set it to Absolute on the left Tab (output node) instead of Relative(default).

    Not entirely sure on all counts, I'd refer to the Unity docs as we use their Billboard technique.

    Afraid not, we don't currently offer a URP Simple Unlit.

    We'll confirm with the devs.
     
    Last edited: Feb 21, 2022
  42. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,100
    Bug happens in a distance not up close, also it might be related to shadows since the moment shadows are switching the bug appears.

    Please try this, if it's still working correctly I will try to prepare small scene - it is always so problematic since unity3d as I know don't provide simple HDRP template but only bloated one.
     
  43. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    We tried a couple of things, no luck I'm afraid.

    No need to send the actual project. Create a new scene using basic Unity objects and try to replicate it there, you can send just the scene file, shaders and materials used there. Could also help if you include your HDRP Asset Files (config)
     
  44. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Is it possible to expose UV values at vertex pass? (I'm doing that in shaderlab as I render 1000s of huge (onscreen pixel-wise) quads and doing a lot of UV operations it is a must to do flipbooks and other UV operations on verts and not pixels)
     
  45. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    409
    The triplanar node seems to alwys define samplers even though in URP we could share sampler states with Use Sampling Macros. The shadercode in a text editor looks like it should work to define only a single sampler for all triplanar samples. All thats really missing is the sampler input on the node (and the logic in the class that creates the code for the node)?
     
  46. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    409
    I am only 90% sure but there is a Vertex to fragment node which sounds suspiciously like what you are looking for
    http://wiki.amplify.pt/index.php?title=Unity_Products:Amplify_Shader_Editor/Vertex_To_Fragment

    It definitely pushes any kind of multiplication / addition I do on the vertex coords into the vertex shader (using Vertex TexCoord to get the mesh uvs).
     
  47. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    You can use the Vertex to Fragment node to run calculation on the Vertex Function.
     
    shamsfk likes this.
  48. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121
    Not entirely sure, we'll have to confirm with the devs. What's you're current URP version.
     
  49. Amplify_Support

    Amplify_Support

    Joined:
    Jul 19, 2013
    Posts:
    121

    Sorry kind of missed that detailed when you posted, what do you mean by "customized"?
     
  50. fleity

    fleity

    Joined:
    Oct 13, 2015
    Posts:
    409
    Unity 2021.2.10f1
    URP 12.1.4
    Amplify 1.8.9.035


    I have another question which feels a bit more pressing. A new empty Universal PBR Shader in Amplify needs to compile 65536 Variants. That is a lot, a huge amount actually. I get this number is based on the amount of multi compile directives and all this shader does is add a "Native" Directive in which all the lighting keywords are included but.. shouldn't this be lower? Or is this simply an issue of urp12? The regular Universal Lit shader Unity ships shows 117 Variants included :-/

    in gets even worse in 2021.2.12.. 393216 variants
    maybe this can be fixed by changing the template?
    Or might be an already tracked URP bug?
    https://issuetracker.unity3d.com/is...iants-which-leads-to-project-build-prevention

    upload_2022-2-23_12-23-40.png
     
    Last edited: Feb 23, 2022