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

    LukeDawn

    Joined:
    Nov 10, 2016
    Posts:
    403
    newguy123 likes this.
  2. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,234
    if ASE support for HDRP 10.2 is coming soon, I wonder if that will include raytracing support. Anybody on the ASE beta/alpha that could shed some light?
     
  3. Deadshot1994

    Deadshot1994

    Joined:
    Sep 6, 2015
    Posts:
    25
    Hi,

    I've encountered a problem with a shader that was made using Amplify Shader Editor that I was sent to by a colleague of mine.

    Everything works on Android, and on Mac / Windows editor, but on iOS I am getting this error, and thus the GameObject that has this shader attached is not being rendered.

    I would appreciate any help


    The Error:
    Compilation failed:
    program_source:209:50: error: assigning to 'float4' (vector of 4 'float&' values) from
    incompatible type 'threadgroup half4' (vector of 4 'half' values)
    output.COLOR0 = input.cp[controlPointID].COLOR0;

    And this is the shader code
    Code (CSharp):
    1. Shader "_FP48/Unlit_Outline"
    2. {
    3.     Properties
    4.     {
    5.         _EdgeLength ( "Edge length", Range( 2, 50 ) ) = 15
    6.         _Texture("Texture", 2D) = "white" {}
    7.         [Header(Shadow)]_ShadowClipValue("Shadow Clip Value", Float) = -0.05
    8.         _ShadowColor("Shadow Color", Color) = (0.1926397,0.314921,0.3679245,0)
    9.         _ShadowOpacity("Shadow Opacity", Range( 0 , 1)) = 0.43
    10.         [Header(Outline)]_OutlineColor("Outline Color", Color) = (0,0,0,0)
    11.         _OutlineWidth("Outline Width", Range( 0 , 0.02)) = 0
    12.         [Header(Inner Outline)][Toggle(_USEINNEROUTLINE_ON)] _UseInnerOutline("Use Inner Outline ? ", Float) = 0
    13.         _InnerOutlineWidth("Inner Outline Width", Range( 0 , 0.2)) = 0
    14.         _AmbiantOcclusion("Ambiant Occlusion", 2D) = "white" {}
    15.         [Normal]_NormalMap("Normal Map", 2D) = "bump" {}
    16.         [HideInInspector] _texcoord( "", 2D ) = "white" {}
    17.         [HideInInspector] __dirty( "", Int ) = 1
    18.     }
    19.     SubShader
    20.     {
    21.         Tags{ }
    22.         Cull Front
    23.         CGPROGRAM
    24.         #include "Tessellation.cginc"
    25.         #pragma target 4.6
    26.         #pragma surface outlineSurf Outline nofog  keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nometa noforwardadd vertex:outlineVertexDataFunc tessellate:tessFunction
    27.         void outlineVertexDataFunc( inout appdata_full v )
    28.         {
    29.             float outlineVar = _OutlineWidth;
    30.             v.vertex.xyz += ( v.normal * outlineVar );
    31.         }
    32.         inline half4 LightingOutline( SurfaceOutput s, half3 lightDir, half atten ) { return half4 ( 0,0,0, s.Alpha); }
    33.         void outlineSurf( Input i, inout SurfaceOutput o )
    34.         {
    35.             o.Emission = _OutlineColor.rgb;
    36.         }
    37.         ENDCG
    38.  
    39.         Tags{ "RenderType" = "Opaque"  "Queue" = "Geometry+0" }
    40.         Cull Back
    41.         CGINCLUDE
    42.         #include "UnityPBSLighting.cginc"
    43.         #include "UnityCG.cginc"
    44.         #include "Tessellation.cginc"
    45.         #include "Lighting.cginc"
    46.         #pragma target 4.6
    47.         #pragma shader_feature _USEINNEROUTLINE_ON
    48.         #ifdef UNITY_PASS_SHADOWCASTER
    49.             #undef INTERNAL_DATA
    50.             #undef WorldReflectionVector
    51.             #undef WorldNormalVector
    52.             #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2;
    53.             #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)))
    54.             #define WorldNormalVector(data,normal) half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))
    55.         #endif
    56.         struct Input
    57.         {
    58.             float3 worldNormal;
    59.             INTERNAL_DATA
    60.             float2 uv_texcoord;
    61.             float3 worldPos;
    62.         };
    63.         struct SurfaceOutputCustomLightingCustom
    64.         {
    65.             half3 Albedo;
    66.             half3 Normal;
    67.             half3 Emission;
    68.             half Metallic;
    69.             half Smoothness;
    70.             half Occlusion;
    71.             half Alpha;
    72.             Input SurfInput;
    73.             UnityGIInput GIData;
    74.         };
    75.         uniform sampler2D _NormalMap;
    76.         uniform float4 _NormalMap_ST;
    77.         uniform sampler2D _Texture;
    78.         uniform float4 _Texture_ST;
    79.         uniform float4 _ShadowColor;
    80.         uniform float _ShadowOpacity;
    81.         uniform float _ShadowClipValue;
    82.         uniform float4 _OutlineColor;
    83.         uniform float _InnerOutlineWidth;
    84.         uniform sampler2D _AmbiantOcclusion;
    85.         uniform float4 _AmbiantOcclusion_ST;
    86.         uniform float _EdgeLength;
    87.         uniform float _OutlineWidth;
    88.         float4 tessFunction( appdata_full v0, appdata_full v1, appdata_full v2 )
    89.         {
    90.             return UnityEdgeLengthBasedTess (v0.vertex, v1.vertex, v2.vertex, _EdgeLength);
    91.         }
    92.         void vertexDataFunc( inout appdata_full v )
    93.         {
    94.             v.vertex.xyz += 0;
    95.         }
    96.         inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi )
    97.         {
    98.             UnityGIInput data = s.GIData;
    99.             Input i = s.SurfInput;
    100.             half4 c = 0;
    101.             SurfaceOutputStandard s34 = (SurfaceOutputStandard ) 0;
    102.             s34.Albedo = float3( 0,0,0 );
    103.             float2 uv_NormalMap = i.uv_texcoord * _NormalMap_ST.xy + _NormalMap_ST.zw;
    104.             s34.Normal = WorldNormalVector( i , UnpackNormal( tex2D( _NormalMap, uv_NormalMap ) ) );
    105.             float2 uv_Texture = i.uv_texcoord * _Texture_ST.xy + _Texture_ST.zw;
    106.             float4 tex2DNode1 = tex2D( _Texture, uv_Texture );
    107.             float4 lerpResult13 = lerp( float4( 1,1,1,0 ) , _ShadowColor , _ShadowOpacity);
    108.             float3 ase_worldPos = i.worldPos;
    109.             #if defined(LIGHTMAP_ON) && UNITY_VERSION < 560 //aseld
    110.             float3 ase_worldlightDir = 0;
    111.             #else //aseld
    112.             float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) );
    113.             #endif //aseld
    114.             float3 ase_worldNormal = WorldNormalVector( i, float3( 0, 0, 1 ) );
    115.             float dotResult4 = dot( ase_worldlightDir , ase_worldNormal );
    116.             float temp_output_6_0 = step( dotResult4 , _ShadowClipValue );
    117.             float4 lerpResult9 = lerp( ( tex2DNode1 * lerpResult13 ) , tex2DNode1 , ( 1.0 - temp_output_6_0 ));
    118.             float temp_output_19_0 = ( _ShadowClipValue + _InnerOutlineWidth );
    119.             float temp_output_3_0_g1 = ( temp_output_19_0 - dotResult4 );
    120.             float4 lerpResult25 = lerp( lerpResult9 , _OutlineColor , saturate( ( saturate( ( temp_output_3_0_g1 / fwidth( temp_output_3_0_g1 ) ) ) - temp_output_6_0 ) ));
    121.             #ifdef _USEINNEROUTLINE_ON
    122.                 float4 staticSwitch29 = lerpResult25;
    123.             #else
    124.                 float4 staticSwitch29 = lerpResult9;
    125.             #endif
    126.             s34.Emission = staticSwitch29.rgb;
    127.             s34.Metallic = 0.0;
    128.             s34.Smoothness = 0.0;
    129.             float2 uv_AmbiantOcclusion = i.uv_texcoord * _AmbiantOcclusion_ST.xy + _AmbiantOcclusion_ST.zw;
    130.             s34.Occlusion = tex2D( _AmbiantOcclusion, uv_AmbiantOcclusion ).r;
    131.             data.light = gi.light;
    132.             UnityGI gi34 = gi;
    133.             #ifdef UNITY_PASS_FORWARDBASE
    134.             Unity_GlossyEnvironmentData g34 = UnityGlossyEnvironmentSetup( s34.Smoothness, data.worldViewDir, s34.Normal, float3(0,0,0));
    135.             gi34 = UnityGlobalIllumination( data, s34.Occlusion, s34.Normal, g34 );
    136.             #endif
    137.             float3 surfResult34 = LightingStandard ( s34, viewDir, gi34 ).rgb;
    138.             surfResult34 += s34.Emission;
    139.             #ifdef UNITY_PASS_FORWARDADD//34
    140.             surfResult34 -= s34.Emission;
    141.             #endif//34
    142.             c.rgb = surfResult34;
    143.             c.a = 1;
    144.             return c;
    145.         }
    146.         inline void LightingStandardCustomLighting_GI( inout SurfaceOutputCustomLightingCustom s, UnityGIInput data, inout UnityGI gi )
    147.         {
    148.             s.GIData = data;
    149.         }
    150.         void surf( Input i , inout SurfaceOutputCustomLightingCustom o )
    151.         {
    152.             o.SurfInput = i;
    153.             o.Normal = float3(0,0,1);
    154.         }
    155.         ENDCG
    156.         CGPROGRAM
    157.         #pragma surface surf StandardCustomLighting keepalpha fullforwardshadows exclude_path:deferred nolightmap  nodirlightmap vertex:vertexDataFunc tessellate:tessFunction
    158.         ENDCG
    159.         Pass
    160.         {
    161.             Name "ShadowCaster"
    162.             Tags{ "LightMode" = "ShadowCaster" }
    163.             ZWrite On
    164.             CGPROGRAM
    165.             #pragma vertex vert
    166.             #pragma fragment frag
    167.             #pragma target 4.6
    168.             #pragma multi_compile_shadowcaster
    169.             #pragma multi_compile UNITY_PASS_SHADOWCASTER
    170.             #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
    171.             #include "HLSLSupport.cginc"
    172.             #if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN )
    173.                 #define CAN_SKIP_VPOS
    174.             #endif
    175.             #include "UnityCG.cginc"
    176.             #include "Lighting.cginc"
    177.             #include "UnityPBSLighting.cginc"
    178.             struct v2f
    179.             {
    180.                 V2F_SHADOW_CASTER;
    181.                 float2 customPack1 : TEXCOORD1;
    182.                 float4 tSpace0 : TEXCOORD2;
    183.                 float4 tSpace1 : TEXCOORD3;
    184.                 float4 tSpace2 : TEXCOORD4;
    185.                 UNITY_VERTEX_INPUT_INSTANCE_ID
    186.                 UNITY_VERTEX_OUTPUT_STEREO
    187.             };
    188.             v2f vert( appdata_full v )
    189.             {
    190.                 v2f o;
    191.                 UNITY_SETUP_INSTANCE_ID( v );
    192.                 UNITY_INITIALIZE_OUTPUT( v2f, o );
    193.                 UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO( o );
    194.                 UNITY_TRANSFER_INSTANCE_ID( v, o );
    195.                 Input customInputData;
    196.                 vertexDataFunc( v );
    197.                 float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz;
    198.                 half3 worldNormal = UnityObjectToWorldNormal( v.normal );
    199.                 half3 worldTangent = UnityObjectToWorldDir( v.tangent.xyz );
    200.                 half tangentSign = v.tangent.w * unity_WorldTransformParams.w;
    201.                 half3 worldBinormal = cross( worldNormal, worldTangent ) * tangentSign;
    202.                 o.tSpace0 = float4( worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x );
    203.                 o.tSpace1 = float4( worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y );
    204.                 o.tSpace2 = float4( worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z );
    205.                 o.customPack1.xy = customInputData.uv_texcoord;
    206.                 o.customPack1.xy = v.texcoord;
    207.                 TRANSFER_SHADOW_CASTER_NORMALOFFSET( o )
    208.                 return o;
    209.             }
    210.             half4 frag( v2f IN
    211.             #if !defined( CAN_SKIP_VPOS )
    212.             , UNITY_VPOS_TYPE vpos : VPOS
    213.             #endif
    214.             ) : SV_Target
    215.             {
    216.                 UNITY_SETUP_INSTANCE_ID( IN );
    217.                 Input surfIN;
    218.                 UNITY_INITIALIZE_OUTPUT( Input, surfIN );
    219.                 surfIN.uv_texcoord = IN.customPack1.xy;
    220.                 float3 worldPos = float3( IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w );
    221.                 half3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );
    222.                 surfIN.worldPos = worldPos;
    223.                 surfIN.worldNormal = float3( IN.tSpace0.z, IN.tSpace1.z, IN.tSpace2.z );
    224.                 surfIN.internalSurfaceTtoW0 = IN.tSpace0.xyz;
    225.                 surfIN.internalSurfaceTtoW1 = IN.tSpace1.xyz;
    226.                 surfIN.internalSurfaceTtoW2 = IN.tSpace2.xyz;
    227.                 SurfaceOutputCustomLightingCustom o;
    228.                 UNITY_INITIALIZE_OUTPUT( SurfaceOutputCustomLightingCustom, o )
    229.                 surf( surfIN, o );
    230.                 #if defined( CAN_SKIP_VPOS )
    231.                 float2 vpos = IN.pos;
    232.                 #endif
    233.                 SHADOW_CASTER_FRAGMENT( IN )
    234.             }
    235.             ENDCG
    236.         }
    237.     }
    238.     Fallback "Diffuse"
    239.     CustomEditor "ASEMaterialInspector"
    240. }
     
  4. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    It's usually the one available on the latest official Unity release; Betas/Alphas excluded.

    In this case, currently at 8.x as the official Unity release; Unity's HDRP 9.x is still in Preview. Support for 10.x will be available around the same time that it's officially released.
     
  5. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Raytracing support is still to be confirmed, there have been multiple issues on Unity's side, and changes, that have made us paused development on our side. In this type of cases, it's best to wait until it's out of Experimental/Preview.
     
  6. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    Hey there, we got back to your email; response is guaranteed there so feel free to use a single point of contact.

    As I mentioned, it's going to be hard to actually test this on a device due to COVID imposed restrictions. However, please try updating ASE and your shader, you're using a very old version.

    Looking forward to hearing from you.
     
  7. Chokury

    Chokury

    Joined:
    Apr 10, 2017
    Posts:
    7
    Hi,

    I have a error spam when I select any material having an Amplify shader for some reason. Is this because of ASE ?

    Thank you for your attention and future help.

     

    Attached Files:

  8. Amplify_Ricardo

    Amplify_Ricardo

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

    That's odd, what ASE version do you use? (Window > Amplify Shader Editor > About)
    What's your current Unity version?

    I would recommend removing ASE and importing the latest version before we proceed. Please check the console immediately after importing.

    1. Remove ASE
    2. Restart Unity
    3. Import ASE
    4. Check console
     
  9. Chokury

    Chokury

    Joined:
    Apr 10, 2017
    Posts:
    7
    It was the latest version.

    So I did remove ASE then restart and the error disappeared.
    But after reimporting ASE the error is back again...
     
  10. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Did you check it on Step 4?

    Please answer my questions as well, could use some details.

    Thanks!
     
  11. Chokury

    Chokury

    Joined:
    Apr 10, 2017
    Posts:
    7
    oh yes sorry, here is what the console says :

    upload_2020-12-15_12-52-21.png
     
  12. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    What ASE version do you use? (Window > Amplify Shader Editor > About)
    What's your current Unity version?
     
  13. Chokury

    Chokury

    Joined:
    Apr 10, 2017
    Posts:
    7
    Unity Version : 2020.1.11f1
    ASE Version : 1.8.7r12
     
  14. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Very odd, what about those warnings?

    Can you replicate this on a new project using the same versions? We're running a few tests on our end as well.
     
  15. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Are you using the Built-in renderer or an of the SRP's?
     
  16. Chokury

    Chokury

    Joined:
    Apr 10, 2017
    Posts:
    7
    It's the Built-in
     
  17. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Thanks!

    We can't replicate it, would be possible to test a sample project with the issue present on our side?

    Please check your console log, you have over 20 warnings there. Let us know what you find there.
     
  18. Chokury

    Chokury

    Joined:
    Apr 10, 2017
    Posts:
    7
    Sure, do you have a mail where I can send you the link please?
    About the warning it's nothing special just a old asset that I have already deleted.
     
  19. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Thanks, support@amplify.pt
     
  20. Chokury

    Chokury

    Joined:
    Apr 10, 2017
    Posts:
    7
    Perfect thanks I will send you the project once I'm home
     
  21. SquareBunnyBoy

    SquareBunnyBoy

    Joined:
    Feb 16, 2020
    Posts:
    27
    After upgrading to Unity 2020.2 none of my amplify shaders if working. I got latest amplify from site.

    Got tons of errors like:
    'GetDecalSurfaceData': no matching 2 parameter function at line 560 (on d3d11)
    undeclared identifier 'ComputeScreenPos' at line 801

    Shaders are failed to compile.
     
  22. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, did you re-save your shader(s) update them with the latest HDRP version?
     
  23. James_M_SteamrollerStudios

    James_M_SteamrollerStudios

    Joined:
    Jan 20, 2016
    Posts:
    6
    Hello.
    Support@amplify.pt
    Couldn't find anything specifically for the issue i'm having here. Perhaps I might be looking for the wrong key word.
    This is my first time using your Editor and I'm having an issue with Alpha cut textures. Seems no matter what kinda Pass, Depth or Blend Mode im using. My Alphas remove opaque geo from the render where alpha is present. So anywhere there is an alpha overlapping a opaque area it will leave it out of the render pass and ill see straight through the mesh. Am I looking at the wrong parameters to change and get what I want? Should I be looking for an Alpha test option?
    Mesh on the left is combined. (single mesh) Mesh in the middle is rigged and has several parts (uncombined) Far right is a sphere with the same shader and textures as the middle.
    2020-12-16 17_43_59-Window.png ScreenshotASE.png
    Using:
    -Forward rendering
    - Unity 2019.3.0f6
    - URP 7.2.1
    - Amplify 1.8.7r12
    Any help would be appreciated,
     
    Last edited: Dec 16, 2020
  24. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    Hi. Is there any way to perform discard function?

    I can do with clip, but it is not really what I want. I want to be able to do such thing as :

    if (x > 0)
    discard;
     
  25. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    also the clip does not really work if I don't actually connect the output with something useful.

    I don't want to use the result of the clip.. I just want to discard the pixel with given value.
     
  26. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    30
    Hi Ricard;
    We got the same problem after updating to 2020.2f1. The shaders are broken, when we try to re-save them, the shader errors got printed again but the shaders stay broken:


    Shader error in 'ASE_MasterShader': 'GetDecalSurfaceData': no matching 2 parameter function at line 610 (on d3d11)

    Shader error in 'ASE_MasterShader': 'LightLoop': cannot convert output parameter from 'struct LightLoopOutput' to 'float3' at line 4799 (on d3d11)

    Shader error in 'ASE_ParticleBasic': undeclared identifier '_BlendMode' at /Projects/Synthetik2/Library/PackageCache/com.unity.render-pipelines.high-definition@10.2.2/Runtime/Material/Material.hlsl(51) (on d3d11)

    Shader error in 'ASE_Muzzle_1.3': undeclared identifier '_BlendMode' at /Projects/Synthetik2/Library/PackageCache/com.unity.render-pipelines.high-definition@10.2.2/Runtime/Material/Material.hlsl(51) (on d3d11)
     
  27. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hello, we'd be happy to assist you!

    Not really sure what result you're looking for here, is this the issue?

    upload_2020-12-17_11-52-15.png

    That's because you're only drawing front faces, if you want it to be double sided, you're going to have to adjust the "Two Sided" parameter on the left, under Additional Options; you have it set to Cull Back Faces.


    Hey there, you'll have to use a Custom Expression for that.



    In relays to Out. In this case, the mode could actually be set to Call instead of Create since it generates and inline instruction; identical case though.



    Hey there, apologies for the inconvenience. Please get the latest update, we just corrected a few things that should ensure that the HDRP template is imported correctly.

    http://amplify.pt/download

    Let us know if the problem persists!
     
    Last edited: Dec 17, 2020
  28. James_M_SteamrollerStudios

    James_M_SteamrollerStudios

    Joined:
    Jan 20, 2016
    Posts:
    6
    @Amplify_Ricardo . I should have posted about the expected result. Sorry about that. Yes, you are correct. The areas you circled are the issue im having. But I don't believe double sided is going to give me the result I desire.
    Using a regular URP Lit shader in the image below the expected result im looking for can be seen. Where the fringe is active through Alpha cut and the geometry behind that alpha is also still drawn and not omitted from the rendered view.
    The geometry is built as such to have a shingled or overlapping look. Hope that helps.
    2020-12-17 08_52_50-Start.png
     
  29. grofie

    grofie

    Joined:
    Dec 9, 2013
    Posts:
    30
    Thank you Ricardo for your fast response. Worked perfectly. Thx again.

    Cheers
     
    Amplify_Ricardo likes this.
  30. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Thanks for elaborating, let's continue this over the email you sent us.

    Please share your asset, along with shader used and textures so that we can debug it on our side.

    Thanks!
     
  31. generalhi

    generalhi

    Joined:
    Oct 6, 2015
    Posts:
    5
    Good afternoon, how are you doing with my appeal?
     
  32. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Hey there, hopping to have a reply for you during the week.

    Thanks for understanding.
     
    generalhi likes this.
  33. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    lines and hand palm with ase!
     
  34. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    Hi. I tried to use the custom expression but I am not sure what to connect the In and Out with. I can ofcourse connect the value part which is the input of the actual value. What is the In and Out for?

    I have no need for the output from the custom expression node.

    upload_2020-12-18_11-40-38.png

    This does not generate any code..
     
  35. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Fantastic!


    The In is your input, not sure I understand your question; please elaborate.

    You can set a Custom Expression to Auto-Register, as you would unconnected Inline Property nodes for example; else no code is generated.

    upload_2020-12-18_11-33-0.png
     
  36. newguy123

    newguy123

    Joined:
    Aug 22, 2018
    Posts:
    1,234
    looks amazing. WOuld love to know more about what you used in here to get these results

    All realtime, no baking? Whar are you using for the fog, clouds, rainbow flare thingy?

    And how do you make the hands appear in the sand like that?
     
  37. nbac

    nbac

    Joined:
    Jul 7, 2015
    Posts:
    267
    no baking - yes. fog is free asset from slightlymad called volumetric lights. clouds is an asset called over cloud (store). rainbow is old school unity flare and some photoshop. hands is the basic parallax occlusion sample from ase and some animated values ramping in height and normals and then ramping in some masked glossiness timed with unitys timeline. animated lines are ase as well - distorting uv´s of a line texture. a lot of quixel mixer texture work. funny enough to pose the whales i used obi soft bodies. :)
     
  38. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    2,511
    I have it set up like this :

    upload_2020-12-18_23-6-7.png

    But it is not working. It creates

    void Discard( float Value )
    {
    if (Value != 0) discard;
    }

    in shader code, but it is not using it anywhere.

    There are no Out value, because the return is void. But the fragment shader does not make use of the Discard function it created.
     
  39. Amplify_RnD_Rick

    Amplify_RnD_Rick

    Joined:
    Feb 15, 2016
    Posts:
    528
    By having the Auto-Register set on the Custom Expression doesn't make ASE use your expression over the final graph, it only lets ASE know that it should register what's in there as a function, even if its not connected to the graph, so other custom expressions can call it directly via their internal code.

    On your case you don't want to have your custom expression set with auto-register, as you must specify to ASE where you want that custom expression code is to be placed over the fragment function.

    The correct way to use is something in the likes of this:

    upload_2020-12-18_16-50-20.png

    The In/Out ports serves as a relay, what is connected on the In port is passed directly to the Out port. The custom expression doesn't modify that value in any means.

    So in this example what will happen is, the Discard custom expression will be written on the shader and then My Final Albedo Color will be set over the Albedo port.

    Regarding Custom Expressions you will always need to let ASE know where you want it to place its code.

    Also please note that I use the Call mode instead of the Create. This mode is specificaly to let ASE know that the code you placed is to be set inline and no function is to be created.
    Over this particular case, Create and Call generate the same final code as we detect no function needs to be created and directly place the code inline, but I just wanted to leave this note for future reference.

    Hope this helps!
     
  40. Disastercake

    Disastercake

    Joined:
    Apr 7, 2012
    Posts:
    317
    Is there a reason "Default Sprites" template is filed under "Legacy"? Is there a new one we should be using instead? The "Universal/Experimental/2D Unlit" template doesn't seem to work with sprites. (Edit: Actually it looks like I had forgotten to set the Universal Render pipeline in my graphics settings. Derp. Think I get it now. Things are just moving to the new pipeline settings systems.) (Also: You have to create a _MainTex texture property to get the shader working instead of the old template parameter.)

    I began checking into it because the "Legacy/Default Sprites" template will break the sprite coloring when the tint variable is adjusted at all in the material inspector. (Edit: Nevermind, this seemed to fix itself after I went into Play mode.)
     
    Last edited: Dec 19, 2020
  41. koirat

    koirat

    Joined:
    Jul 7, 2012
    Posts:
    2,008
    As I know 2020.2 is still not supported, any ETA ?

    Anyway I'm posting my current shader errors I got in 2020.2 it might be helpful.

    undeclared identifier 'ComputeScreenPos' D3D 383
    undeclared identifier 'ComputeScreenPos' D3D 1090
    undeclared identifier '_BlendMode' D3D Material.hlsl 51
     
  42. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387

    Hey, good to know you solved it.
    Legacy sprite/UI shaders are definitely the way to go for regular suff.

    Hey, we started rolling our 2020.2 support via our website, Asset Store to follow soon after.

    http://amplify.pt/download/
     
  43. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    106
    Hi, just curious is the shader generated from this plugin friendly for mobile?
     
  44. 13524656829

    13524656829

    Joined:
    Jun 20, 2017
    Posts:
    3
    Hi, I ran into this Custom Expression node issue.
    It worked fine in ASE v1.8.5, but started throwing error log when I updated into 1.8.7. Both I updated via Unity Packagemanager.
    My graph relies heavily on directly inserted Custom Expression code, so HELP PLS!!!!!
    Btw My Unity version is 2020.1.3f1. CustomExpressionIssue.png

    Alright got help from Discord channel, had to add return instruction at the beginning.
    But its still kind of weird to create a function over another function just to make it work...
     
    Last edited: Dec 22, 2020
  45. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    832
    Hi @Amplify_Ricardo and friends, how do I get rid of the square around point lights when trying to use them for cell shading?

    Screen Shot 2020-12-23 at 13.34.11.png Screen Shot 2020-12-23 at 13.34.16.png
     
  46. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Following up on our Discord discussion regarding this issue, for future reference.

    We tested on the code generated by the custom expression on 1.8.5 and there was indeed an issue on our end with that method over the 1.8.7 version. This will be fixed on our next build, but until then you can just add a return instruction over the code and finish with an ;.

    Hey there, I believe that's caused by your Light Color node RGBA output not being multiplied by the attenuation.

    Something like this should do it: http://paste.amplify.pt/view/raw/3f737314 (paste link to canvas)
     
  47. Amplify_Ricardo

    Amplify_Ricardo

    Joined:
    Jul 19, 2013
    Posts:
    2,387
    Yes, very much. However, it's important to note that performance is directly related to the complexity of the operations you use; the same would be true for manually coded shaders. e.g. Noise nodes are performance intensive and not recommended on Mobile.
     
  48. enhawk

    enhawk

    Joined:
    Aug 22, 2013
    Posts:
    832
    That worked perfectly thank you!

    Is there a way to stop the light from "bleaching" in the center out after adding this?
    Screen Shot 2020-12-24 at 18.23.58.png
     
  49. RakNet

    RakNet

    Joined:
    Oct 9, 2013
    Posts:
    313

    Attached Files:

  50. Innovine

    Innovine

    Joined:
    Aug 6, 2017
    Posts:
    522
    I recently installed the Amplify Shader Editor into my project, and the frame rate went from 160fps to 10.
    Removing amplify didnt help.
    What can have gone wrong?
    Unity 2021.1.05a, built in pipeline