Page 1 of 1

Shadows not smooth in Custom Lighting shader

PostPosted: Fri Nov 17, 2017 4:06 pm
by GDoll
Hi,
In this example the shadows don't look smooth in the Custom Lighting shader. Is there anything I'm missing? Thank you. I'm using the latest version of ASE. https://imgur.com/a/bQO7i

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Fri Nov 17, 2017 4:23 pm
by Amplify_Borba
Hello!

Would it be possible for you to send us a shader sample with the issue present so we can debug it on our side? Its hard to tell from the screenshot what the issue might be.

Looking forward to your reply!

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Fri Nov 17, 2017 4:54 pm
by GDoll
Hello,

The shader works. However, when enabling shadows in the Directional Light, the shadows don look good. I thought there is something I have not done correctly within the shader.

Thanks for the fast support!

Here is a code sample of the shader: :o

Code: Select all
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "ASE/ASE_CustomRimLighting"
{
   Properties
   {
      _WrapperValue("Wrapper Value", Float) = 0.5
      _ToonRamp("Toon Ramp", 2D) = "white" {}
      [HDR]_Color1("Color 1", Color) = (0,1,0.8758622,0)
      _RimPower("Rim Power", Range( 0 , 10)) = 0.5
      _RimOffset("Rim Offset", Range( 0 , 1)) = 0.24
      _Diffuse("Diffuse", 2D) = "white" {}
      _Thickness("Thickness", 2D) = "white" {}
      _AO("AO", 2D) = "white" {}
      _ThicknessAmount("ThicknessAmount", Range( 0 , 10)) = 0
      _AOamount("AOamount", Range( 0 , 10)) = 0
      _VertexColorAmount("VertexColor Amount", Range( 0 , 1)) = 0
      _MainColor("MainColor", Color) = (0,0,0,0)
      _NearColor("NearColor", Color) = (0,0,0,0)
      _VertexAmount_Falloff("VertexAmount_Falloff", Range( 0 , 1)) = 0
      _TransitionDistance("TransitionDistance", Range( 0 , 24)) = 0
      _FarColor("FarColor", Color) = (0,0,0,0)
      _Falloff("Falloff", Range( 0 , 3)) = 0
      _NormalMap("NormalMap", 2D) = "white" {}
      _NormalStrength("Normal Strength", Range( 1 , 10)) = 0
      _BlinkColor1("BlinkColor1", Color) = (0,0,0,0)
      _PulseSpeed("PulseSpeed", Range( 0 , 60)) = 0
      _BlinkColor2("BlinkColor2", Color) = (0,0,0,0)
      [Toggle]_ToggleBlinking("Toggle Blinking", Int) = 0
      [HideInInspector] _texcoord( "", 2D ) = "white" {}
      [HideInInspector] __dirty( "", Int ) = 1
   }

   SubShader
   {
      Tags{ "RenderType" = "Opaque"  "Queue" = "Geometry+0" "IsEmissive" = "true"  }
      Cull Off
      CGINCLUDE
      #include "UnityPBSLighting.cginc"
      #include "UnityShaderVariables.cginc"
      #include "UnityCG.cginc"
      #include "Lighting.cginc"
      #pragma target 3.0
      #pragma shader_feature _TOGGLEBLINKING_ON
      #ifdef UNITY_PASS_SHADOWCASTER
         #undef INTERNAL_DATA
         #undef WorldReflectionVector
         #undef WorldNormalVector
         #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2;
         #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)))
         #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))
      #endif
      struct Input
      {
         float4 vertexColor : COLOR;
         float3 worldPos;
         float2 uv_texcoord;
         float3 worldNormal;
         INTERNAL_DATA
      };

      struct SurfaceOutputCustomLightingCustom
      {
         fixed3 Albedo;
         fixed3 Normal;
         half3 Emission;
         half Metallic;
         half Smoothness;
         half Occlusion;
         fixed Alpha;
         Input SurfInput;
         UnityGIInput GIData;
      };

      uniform fixed4 _BlinkColor1;
      uniform fixed4 _BlinkColor2;
      uniform fixed _PulseSpeed;
      uniform fixed _VertexAmount_Falloff;
      uniform fixed4 _NearColor;
      uniform fixed4 _FarColor;
      uniform fixed _TransitionDistance;
      uniform fixed _Falloff;
      uniform sampler2D _Thickness;
      uniform float4 _Thickness_ST;
      uniform fixed _ThicknessAmount;
      uniform sampler2D _AO;
      uniform float4 _AO_ST;
      uniform fixed _AOamount;
      uniform fixed4 _MainColor;
      uniform sampler2D _Diffuse;
      uniform float4 _Diffuse_ST;
      uniform sampler2D _ToonRamp;
      uniform fixed _WrapperValue;
      uniform fixed _RimOffset;
      uniform fixed _RimPower;
      uniform fixed4 _Color1;
      uniform fixed _VertexColorAmount;
      uniform sampler2D _NormalMap;
      uniform float4 _NormalMap_ST;
      uniform fixed _NormalStrength;

      inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi )
      {
         UnityGIInput data = s.GIData;
         Input i = s.SurfInput;
         half4 c = 0;
         #if DIRECTIONAL
         float ase_lightAtten = data.atten;
         if( _LightColor0.a == 0)
         ase_lightAtten = 0;
         #else
         float3 ase_lightAttenRGB = gi.light.color / ( ( _LightColor0.rgb ) + 0.000001 );
         float ase_lightAtten = max( max( ase_lightAttenRGB.r, ase_lightAttenRGB.g ), ase_lightAttenRGB.b );
         #endif
         float mulTime129 = _Time.y * _PulseSpeed;
         float4 lerpResult123 = lerp( _BlinkColor1 , _BlinkColor2 , (0.0 + (sin( ( _PulseSpeed * mulTime129 ) ) - -1.0) * (1.0 - 0.0) / (1.0 - -1.0)));
         float3 ase_worldPos = i.worldPos;
         float3 ase_worldViewDir = normalize( UnityWorldSpaceViewDir( ase_worldPos ) );
         float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) );
         float3 normalizeResult4_g2 = normalize( ( ase_worldViewDir + ase_worldlightDir ) );
         fixed3 temp_cast_0 = (exp2( _Falloff )).xxx;
         float3 clampResult95 = clamp( pow( ( normalizeResult4_g2 / _TransitionDistance ) , temp_cast_0 ) , float3( 0.0,0,0 ) , float3( 1.0,0,0 ) );
         float4 lerpResult81 = lerp( _NearColor , _FarColor , clampResult95.x);
         float4 lerpResult82 = lerp( ( i.vertexColor * _VertexAmount_Falloff ) , lerpResult81 , clampResult95.x);
         float2 uv_Thickness = i.uv_texcoord * _Thickness_ST.xy + _Thickness_ST.zw;
         float2 uv_AO = i.uv_texcoord * _AO_ST.xy + _AO_ST.zw;
         float2 uv_Diffuse = i.uv_texcoord * _Diffuse_ST.xy + _Diffuse_ST.zw;
         float3 normalizeResult4_g1 = normalize( ( ase_worldViewDir + ase_worldlightDir ) );
         float3 temp_output_196_0 = normalizeResult4_g1;
         fixed3 temp_cast_3 = (_WrapperValue).xxx;
         fixed3 ase_worldNormal = WorldNormalVector( i, fixed3( 0, 0, 1 ) );
         UnityGI gi40 = gi;
         gi40 = UnityGI_Base( data, 1, ase_worldNormal );
         float3 indirectDiffuse40 = gi40.indirect.diffuse;
         fixed3 temp_cast_6 = (exp2( _RimPower )).xxx;
         float4 temp_output_107_0 = ( lerpResult82 * ( ( ( tex2D( _Thickness, uv_Thickness ) * _ThicknessAmount ) * ( ( tex2D( _AO, uv_AO ) * _AOamount ) * ( ( ( _MainColor * ( tex2D( _Diffuse, uv_Diffuse ) * tex2D( _ToonRamp, saturate( (temp_output_196_0*_WrapperValue + temp_cast_3) ).xy ) ) ) * ( _LightColor0 * fixed4( ( indirectDiffuse40 + ase_lightAtten ) , 0.0 ) ) ) + ( ( fixed4( saturate( ( ( ase_lightAtten * 0.0 ) * pow( ( 1.0 - saturate( ( temp_output_196_0 + _RimOffset ) ) ) , temp_cast_6 ) ) ) , 0.0 ) * ( _Color1 * _LightColor0 ) ) + ( i.vertexColor * _VertexColorAmount ) ) ) ) ) * _LightColor0 * ase_lightAtten ) );
         fixed3 temp_cast_8 = (_WrapperValue).xxx;
         fixed3 temp_cast_11 = (exp2( _RimPower )).xxx;
         #ifdef _TOGGLEBLINKING_ON
            float4 staticSwitch195 = ( lerpResult123 + temp_output_107_0 );
         #else
            float4 staticSwitch195 = temp_output_107_0;
         #endif
         float2 uv_NormalMap = i.uv_texcoord * _NormalMap_ST.xy + _NormalMap_ST.zw;
         float3 appendResult114 = (fixed3(( (tex2D( _NormalMap, uv_NormalMap )).rg * _NormalStrength ) , 1.0));
         c.rgb = ( staticSwitch195 * fixed4( appendResult114 , 0.0 ) ).rgb;
         c.a = 1;
         return c;
      }

      inline void LightingStandardCustomLighting_GI( inout SurfaceOutputCustomLightingCustom s, UnityGIInput data, inout UnityGI gi )
      {
         s.GIData = data;
      }

      void surf( Input i , inout SurfaceOutputCustomLightingCustom o )
      {
         o.SurfInput = i;
         o.Normal = float3(0,0,1);
      }

      ENDCG
      CGPROGRAM
      #pragma surface surf StandardCustomLighting keepalpha fullforwardshadows exclude_path:deferred

      ENDCG
      Pass
      {
         Name "ShadowCaster"
         Tags{ "LightMode" = "ShadowCaster" }
         ZWrite On
         CGPROGRAM
         #pragma vertex vert
         #pragma fragment frag
         #pragma target 3.0
         #pragma multi_compile_shadowcaster
         #pragma multi_compile UNITY_PASS_SHADOWCASTER
         #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
         # include "HLSLSupport.cginc"
         #if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN )
            #define CAN_SKIP_VPOS
         #endif
         #include "UnityCG.cginc"
         #include "Lighting.cginc"
         #include "UnityPBSLighting.cginc"
         sampler3D _DitherMaskLOD;
         struct v2f
         {
            V2F_SHADOW_CASTER;
            float4 tSpace0 : TEXCOORD1;
            float4 tSpace1 : TEXCOORD2;
            float4 tSpace2 : TEXCOORD3;
            float4 texcoords01 : TEXCOORD4;
            UNITY_VERTEX_INPUT_INSTANCE_ID
         };
         v2f vert( appdata_full v )
         {
            v2f o;
            UNITY_SETUP_INSTANCE_ID( v );
            UNITY_INITIALIZE_OUTPUT( v2f, o );
            UNITY_TRANSFER_INSTANCE_ID( v, o );
            float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz;
            fixed3 worldNormal = UnityObjectToWorldNormal( v.normal );
            fixed3 worldTangent = UnityObjectToWorldDir( v.tangent.xyz );
            fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w;
            fixed3 worldBinormal = cross( worldNormal, worldTangent ) * tangentSign;
            o.tSpace0 = float4( worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x );
            o.tSpace1 = float4( worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y );
            o.tSpace2 = float4( worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z );
            o.texcoords01 = float4( v.texcoord.xy, v.texcoord1.xy );
            TRANSFER_SHADOW_CASTER_NORMALOFFSET( o )
            return o;
         }
         fixed4 frag( v2f IN
         #if !defined( CAN_SKIP_VPOS )
         , UNITY_VPOS_TYPE vpos : VPOS
         #endif
         ) : SV_Target
         {
            UNITY_SETUP_INSTANCE_ID( IN );
            Input surfIN;
            UNITY_INITIALIZE_OUTPUT( Input, surfIN );
            surfIN.uv_texcoord.xy = IN.texcoords01.xy;
            float3 worldPos = float3( IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w );
            fixed3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );
            surfIN.worldPos = worldPos;
            surfIN.worldNormal = float3( IN.tSpace0.z, IN.tSpace1.z, IN.tSpace2.z );
            surfIN.internalSurfaceTtoW0 = IN.tSpace0.xyz;
            surfIN.internalSurfaceTtoW1 = IN.tSpace1.xyz;
            surfIN.internalSurfaceTtoW2 = IN.tSpace2.xyz;
            SurfaceOutputCustomLightingCustom o;
            UNITY_INITIALIZE_OUTPUT( SurfaceOutputCustomLightingCustom, o )
            surf( surfIN, o );
            #if defined( CAN_SKIP_VPOS )
            float2 vpos = IN.pos;
            #endif
            SHADOW_CASTER_FRAGMENT( IN )
         }
         ENDCG
      }
   }
   Fallback "Diffuse"
   CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=13701
-1913;29;1350;988;-3569.348;288.1114;1;True;True
Node;AmplifyShaderEditor.CommentaryNode;2;-2399.7,430.5916;Float;False;1617.938;553.8222;;14;33;30;29;25;26;22;21;20;18;16;13;6;8;108;Rim Light;1,1,1,1;0;0
Node;AmplifyShaderEditor.RangedFloatNode;6;-2390.651,748.6102;Float;False;Property;_RimOffset;Rim Offset;3;0;0.24;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.FunctionNode;196;-2562.063,59.64466;Float;False;Blinn-Phong Half Vector;-1;;1;0;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;11;-2214.811,-488.8889;Float;False;723.599;290;Also know as Lambert Wrap or Half Lambert;2;17;12;Diffuse Wrap;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleAddOpNode;8;-2129.2,590.5917;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;15;-1942.809,-49.24195;Float;False;812;304;Comment;5;32;28;27;40;41;Attenuation and Ambient;1,1,1,1;0;0
Node;AmplifyShaderEditor.SaturateNode;13;-1951.7,590.5917;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.RangedFloatNode;12;-2188.228,-410.6395;Float;False;Property;_WrapperValue;Wrapper Value;0;0;0.5;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;16;-1998.632,795.4374;Float;False;Property;_RimPower;Rim Power;2;0;0.5;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.ScaleAndOffsetNode;17;-1847.81,-439.489;Float;False;3;0;FLOAT3;0,0,0;False;1;FLOAT;1.0;False;2;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.LightAttenuation;41;-1883.143,148.8212;Float;False;0;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;18;-1775.7,590.5917;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.Exp2OpNode;108;-1644.759,801.3284;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;20;-1574.5,487.8914;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.PowerNode;21;-1583.7,590.5917;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.SaturateNode;19;-1590.138,-435.3419;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;49;-570.7978,501.1486;Float;False;500.1996;408.1997;// Add VertexColor;3;45;47;48; Add VertexColor;1,1,1,1;0;0
Node;AmplifyShaderEditor.SamplerNode;23;-1263.238,-462.2419;Float;True;Property;_ToonRamp;Toon Ramp;0;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.LightColorNode;26;-1323.377,884.0044;Float;False;0;3;COLOR;FLOAT3;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;25;-1343.7,558.5917;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT3;0;False;1;FLOAT3
Node;AmplifyShaderEditor.ColorNode;22;-1423.7,702.5917;Float;False;Property;_Color1;Color 1;1;1;[HDR];0,1,0.8758622,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.IndirectDiffuseLighting;40;-1717.387,78.29767;Float;False;Tangent;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SamplerNode;24;-1249.238,-696.3418;Float;True;Property;_Diffuse;Diffuse;4;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SaturateNode;30;-1151.7,558.5917;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;97;1358.244,-1417.337;Float;False;1419.808;1280.744;// Radial Falloff;13;79;80;81;86;82;90;91;93;94;92;95;85;197;Radial Falloff;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleAddOpNode;27;-1448.809,118.758;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.VertexColorNode;45;-520.7975,551.1486;Float;False;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;31;-881.7379,-591.2425;Float;False;2;2;0;COLOR;0.0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.ColorNode;52;-1151.631,-923.7466;Float;False;Property;_MainColor;MainColor;8;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.LightColorNode;28;-1879.968,-2.493788;Float;False;0;3;COLOR;FLOAT3;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;29;-1119.7,686.5917;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;48;-520.5981,767.9484;Float;False;Property;_VertexColorAmount;VertexColor Amount;7;0;0;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.FunctionNode;197;1546.691,-647.1498;Float;False;Blinn-Phong Half Vector;-1;;2;0;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;32;-1286.809,-1.241959;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT3;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;94;1557.585,-354.4078;Float;False;Property;_Falloff;Falloff;16;0;0;0;3;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;91;1526.445,-520.9108;Float;False;Property;_TransitionDistance;TransitionDistance;15;0;0;0;24;0;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;51;-367.2435,-793.1843;Float;False;751.2006;390.5006;// Add AO;3;43;36;42;;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;44;-652.2967,-544.5734;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;47;-239.5973,607.1481;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;135;2894.586,-525.0039;Float;False;1090.219;307.7491;// Pulse;6;128;129;139;140;141;123;Pulse;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;33;-959.7,558.5917;Float;False;2;2;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.Exp2OpNode;93;2088.619,-348.7776;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleDivideOpNode;90;1885.954,-653.8613;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;34;-494.4621,-27.30714;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleAddOpNode;46;-258.0342,97.30165;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SamplerNode;36;-325.0435,-734.7844;Float;True;Property;_AO;AO;5;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;128;2901.855,-477.0793;Float;False;Property;_PulseSpeed;PulseSpeed;23;0;0;0;60;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;43;-306.7406,-493.6838;Float;False;Property;_AOamount;AOamount;6;0;0;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;57;429.6628,-784.285;Float;False;603.9003;457.7006;// Add Thickness;3;54;53;55;;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleTimeNode;129;3093.193,-313.1115;Float;False;1;0;FLOAT;1.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;55;490.1632,-441.5843;Float;False;Property;_ThicknessAmount;ThicknessAmount;6;0;0;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.SamplerNode;54;464.6628,-731.285;Float;True;Property;_Thickness;Thickness;5;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;35;-24.33023,-23.65559;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.WireNode;102;383.255,192.2686;Float;False;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;42;161.9571,-599.8834;Float;False;2;2;0;COLOR;0.0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.PowerNode;92;2050.727,-657.7778;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.ColorNode;79;1392.054,-1164.083;Float;False;Property;_NearColor;NearColor;14;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.WireNode;101;1027.341,-1047.526;Float;False;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;50;543.0836,39.31131;Float;False;2;2;0;COLOR;0.0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;85;1936.89,-1137.457;Float;False;Property;_VertexAmount_Falloff;VertexAmount_Falloff;15;0;0;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.ClampOpNode;95;2271.61,-653.9889;Float;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0.0,0,0;False;2;FLOAT3;1.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;140;3253.568,-410.715;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;192;1273.052,-39.3274;Float;False;561.0262;362.5238;// Final Lighting;3;190;191;189;;1,1,1,1;0;0
Node;AmplifyShaderEditor.ColorNode;80;1393.3,-966.3401;Float;False;Property;_FarColor;FarColor;15;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;53;864.5636,-482.7848;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;56;1033.348,22.97939;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SinOpNode;139;3429.9,-402.7349;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;136;3121.565,-1145.422;Float;False;1329.835;465.5912;// Glow;2;124;142;Glow;1,1,1,1;0;0
Node;AmplifyShaderEditor.LightAttenuation;190;1330.052,213.1964;Float;False;0;1;FLOAT
Node;AmplifyShaderEditor.LightColorNode;191;1323.052,121.1964;Float;False;0;3;COLOR;FLOAT3;FLOAT
Node;AmplifyShaderEditor.LerpOp;81;1806.204,-983.6225;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;86;2264.163,-1217.297;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;116;2378.95,394.9289;Float;False;1218.011;472.2495;// Add Normal;6;113;111;115;112;114;110;Add Normal;1,1,1,1;0;0
Node;AmplifyShaderEditor.ColorNode;124;3204.336,-1095.421;Float;False;Property;_BlinkColor1;BlinkColor1;21;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;189;1665.078,10.6726;Float;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.LerpOp;82;2495.842,-850.6684;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.ColorNode;142;3211.413,-896.3698;Float;False;Property;_BlinkColor2;BlinkColor2;23;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SamplerNode;110;2399.956,462.7282;Float;True;Property;_NormalMap;NormalMap;19;0;None;True;0;True;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.TFHCRemapNode;141;3603.731,-394.2177;Float;False;5;0;FLOAT;0.0;False;1;FLOAT;-1.0;False;2;FLOAT;1.0;False;3;FLOAT;0.0;False;4;FLOAT;1.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;107;2785.998,-6.170811;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.ComponentMaskNode;111;2799.784,493.328;Float;True;True;True;False;False;1;0;COLOR;0,0,0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;113;2631.683,752.1784;Float;False;Property;_NormalStrength;Normal Strength;20;0;0;1;10;0;1;FLOAT
Node;AmplifyShaderEditor.LerpOp;123;3792.864,-473.5222;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleAddOpNode;193;3563.518,14.36576;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;112;3178.057,576.16;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;115;3221.694,736.4588;Float;False;Constant;_Float0;Float 0;21;0;1;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.StaticSwitch;195;3711.173,172.4918;Float;False;Property;_ToggleBlinking;Toggle Blinking;23;0;0;False;True;;2;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.DynamicAppendNode;114;3429.96,564.3941;Float;False;FLOAT3;4;0;FLOAT2;0,0;False;1;FLOAT;0.0;False;2;FLOAT;0.0;False;3;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;194;4121.967,180.1915;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;4470.797,52.78987;Fixed;False;True;2;Fixed;ASEMaterialInspector;0;0;CustomLighting;ASE/ASE_CustomRimLighting;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Off;0;0;False;0;0;Opaque;0.5;True;True;0;False;Opaque;Geometry;ForwardOnly;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;False;0;255;255;0;0;0;0;0;0;0;0;False;0;4;10;25;False;0.5;True;0;Zero;Zero;0;Zero;Zero;Add;Add;0;False;0;0,0,0,0;VertexOffset;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;0;0;False;14;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0.0;False;4;FLOAT;0.0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0.0;False;10;FLOAT;0.0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
WireConnection;8;0;196;0
WireConnection;8;1;6;0
WireConnection;13;0;8;0
WireConnection;17;0;196;0
WireConnection;17;1;12;0
WireConnection;17;2;12;0
WireConnection;18;0;13;0
WireConnection;108;0;16;0
WireConnection;20;0;41;0
WireConnection;21;0;18;0
WireConnection;21;1;108;0
WireConnection;19;0;17;0
WireConnection;23;1;19;0
WireConnection;25;0;20;0
WireConnection;25;1;21;0
WireConnection;30;0;25;0
WireConnection;27;0;40;0
WireConnection;27;1;41;0
WireConnection;31;0;24;0
WireConnection;31;1;23;0
WireConnection;29;0;22;0
WireConnection;29;1;26;0
WireConnection;32;0;28;0
WireConnection;32;1;27;0
WireConnection;44;0;52;0
WireConnection;44;1;31;0
WireConnection;47;0;45;0
WireConnection;47;1;48;0
WireConnection;33;0;30;0
WireConnection;33;1;29;0
WireConnection;93;0;94;0
WireConnection;90;0;197;0
WireConnection;90;1;91;0
WireConnection;34;0;44;0
WireConnection;34;1;32;0
WireConnection;46;0;33;0
WireConnection;46;1;47;0
WireConnection;129;0;128;0
WireConnection;35;0;34;0
WireConnection;35;1;46;0
WireConnection;102;0;45;0
WireConnection;42;0;36;0
WireConnection;42;1;43;0
WireConnection;92;0;90;0
WireConnection;92;1;93;0
WireConnection;101;0;102;0
WireConnection;50;0;42;0
WireConnection;50;1;35;0
WireConnection;95;0;92;0
WireConnection;140;0;128;0
WireConnection;140;1;129;0
WireConnection;53;0;54;0
WireConnection;53;1;55;0
WireConnection;56;0;53;0
WireConnection;56;1;50;0
WireConnection;139;0;140;0
WireConnection;81;0;79;0
WireConnection;81;1;80;0
WireConnection;81;2;95;0
WireConnection;86;0;101;0
WireConnection;86;1;85;0
WireConnection;189;0;56;0
WireConnection;189;1;191;0
WireConnection;189;2;190;0
WireConnection;82;0;86;0
WireConnection;82;1;81;0
WireConnection;82;2;95;0
WireConnection;141;0;139;0
WireConnection;107;0;82;0
WireConnection;107;1;189;0
WireConnection;111;0;110;0
WireConnection;123;0;124;0
WireConnection;123;1;142;0
WireConnection;123;2;141;0
WireConnection;193;0;123;0
WireConnection;193;1;107;0
WireConnection;112;0;111;0
WireConnection;112;1;113;0
WireConnection;195;0;193;0
WireConnection;195;1;107;0
WireConnection;114;0;112;0
WireConnection;114;2;115;0
WireConnection;194;0;195;0
WireConnection;194;1;114;0
WireConnection;0;2;194;0
ASEEND*/
//CHKSM=F076F65C6E1840E8226E814F91739766342E64C0

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Fri Nov 17, 2017 7:56 pm
by Ricardo Teixeira
Hello,

Thank you for the sample, we really appreciate it. Please download the latest ASE version (updated today with a few relevant fixes) directly from our website using your invoice number and test your shader. If the problem persists, please forward us a sample with the shader, material, and simple scene with the problem present.

Amplify Products - Download

Thanks!


GDoll wrote:Hello,

The shader works. However, when enabling shadows in the Directional Light, the shadows don look good. I thought there is something I have not done correctly within the shader.

Thanks for the fast support!

Here is a code sample of the shader: :o

Code: Select all
// Made with Amplify Shader Editor
// Available at the Unity Asset Store - http://u3d.as/y3X
Shader "ASE/ASE_CustomRimLighting"
{
   Properties
   {
      _WrapperValue("Wrapper Value", Float) = 0.5
      _ToonRamp("Toon Ramp", 2D) = "white" {}
      [HDR]_Color1("Color 1", Color) = (0,1,0.8758622,0)
      _RimPower("Rim Power", Range( 0 , 10)) = 0.5
      _RimOffset("Rim Offset", Range( 0 , 1)) = 0.24
      _Diffuse("Diffuse", 2D) = "white" {}
      _Thickness("Thickness", 2D) = "white" {}
      _AO("AO", 2D) = "white" {}
      _ThicknessAmount("ThicknessAmount", Range( 0 , 10)) = 0
      _AOamount("AOamount", Range( 0 , 10)) = 0
      _VertexColorAmount("VertexColor Amount", Range( 0 , 1)) = 0
      _MainColor("MainColor", Color) = (0,0,0,0)
      _NearColor("NearColor", Color) = (0,0,0,0)
      _VertexAmount_Falloff("VertexAmount_Falloff", Range( 0 , 1)) = 0
      _TransitionDistance("TransitionDistance", Range( 0 , 24)) = 0
      _FarColor("FarColor", Color) = (0,0,0,0)
      _Falloff("Falloff", Range( 0 , 3)) = 0
      _NormalMap("NormalMap", 2D) = "white" {}
      _NormalStrength("Normal Strength", Range( 1 , 10)) = 0
      _BlinkColor1("BlinkColor1", Color) = (0,0,0,0)
      _PulseSpeed("PulseSpeed", Range( 0 , 60)) = 0
      _BlinkColor2("BlinkColor2", Color) = (0,0,0,0)
      [Toggle]_ToggleBlinking("Toggle Blinking", Int) = 0
      [HideInInspector] _texcoord( "", 2D ) = "white" {}
      [HideInInspector] __dirty( "", Int ) = 1
   }

   SubShader
   {
      Tags{ "RenderType" = "Opaque"  "Queue" = "Geometry+0" "IsEmissive" = "true"  }
      Cull Off
      CGINCLUDE
      #include "UnityPBSLighting.cginc"
      #include "UnityShaderVariables.cginc"
      #include "UnityCG.cginc"
      #include "Lighting.cginc"
      #pragma target 3.0
      #pragma shader_feature _TOGGLEBLINKING_ON
      #ifdef UNITY_PASS_SHADOWCASTER
         #undef INTERNAL_DATA
         #undef WorldReflectionVector
         #undef WorldNormalVector
         #define INTERNAL_DATA half3 internalSurfaceTtoW0; half3 internalSurfaceTtoW1; half3 internalSurfaceTtoW2;
         #define WorldReflectionVector(data,normal) reflect (data.worldRefl, half3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal)))
         #define WorldNormalVector(data,normal) fixed3(dot(data.internalSurfaceTtoW0,normal), dot(data.internalSurfaceTtoW1,normal), dot(data.internalSurfaceTtoW2,normal))
      #endif
      struct Input
      {
         float4 vertexColor : COLOR;
         float3 worldPos;
         float2 uv_texcoord;
         float3 worldNormal;
         INTERNAL_DATA
      };

      struct SurfaceOutputCustomLightingCustom
      {
         fixed3 Albedo;
         fixed3 Normal;
         half3 Emission;
         half Metallic;
         half Smoothness;
         half Occlusion;
         fixed Alpha;
         Input SurfInput;
         UnityGIInput GIData;
      };

      uniform fixed4 _BlinkColor1;
      uniform fixed4 _BlinkColor2;
      uniform fixed _PulseSpeed;
      uniform fixed _VertexAmount_Falloff;
      uniform fixed4 _NearColor;
      uniform fixed4 _FarColor;
      uniform fixed _TransitionDistance;
      uniform fixed _Falloff;
      uniform sampler2D _Thickness;
      uniform float4 _Thickness_ST;
      uniform fixed _ThicknessAmount;
      uniform sampler2D _AO;
      uniform float4 _AO_ST;
      uniform fixed _AOamount;
      uniform fixed4 _MainColor;
      uniform sampler2D _Diffuse;
      uniform float4 _Diffuse_ST;
      uniform sampler2D _ToonRamp;
      uniform fixed _WrapperValue;
      uniform fixed _RimOffset;
      uniform fixed _RimPower;
      uniform fixed4 _Color1;
      uniform fixed _VertexColorAmount;
      uniform sampler2D _NormalMap;
      uniform float4 _NormalMap_ST;
      uniform fixed _NormalStrength;

      inline half4 LightingStandardCustomLighting( inout SurfaceOutputCustomLightingCustom s, half3 viewDir, UnityGI gi )
      {
         UnityGIInput data = s.GIData;
         Input i = s.SurfInput;
         half4 c = 0;
         #if DIRECTIONAL
         float ase_lightAtten = data.atten;
         if( _LightColor0.a == 0)
         ase_lightAtten = 0;
         #else
         float3 ase_lightAttenRGB = gi.light.color / ( ( _LightColor0.rgb ) + 0.000001 );
         float ase_lightAtten = max( max( ase_lightAttenRGB.r, ase_lightAttenRGB.g ), ase_lightAttenRGB.b );
         #endif
         float mulTime129 = _Time.y * _PulseSpeed;
         float4 lerpResult123 = lerp( _BlinkColor1 , _BlinkColor2 , (0.0 + (sin( ( _PulseSpeed * mulTime129 ) ) - -1.0) * (1.0 - 0.0) / (1.0 - -1.0)));
         float3 ase_worldPos = i.worldPos;
         float3 ase_worldViewDir = normalize( UnityWorldSpaceViewDir( ase_worldPos ) );
         float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) );
         float3 normalizeResult4_g2 = normalize( ( ase_worldViewDir + ase_worldlightDir ) );
         fixed3 temp_cast_0 = (exp2( _Falloff )).xxx;
         float3 clampResult95 = clamp( pow( ( normalizeResult4_g2 / _TransitionDistance ) , temp_cast_0 ) , float3( 0.0,0,0 ) , float3( 1.0,0,0 ) );
         float4 lerpResult81 = lerp( _NearColor , _FarColor , clampResult95.x);
         float4 lerpResult82 = lerp( ( i.vertexColor * _VertexAmount_Falloff ) , lerpResult81 , clampResult95.x);
         float2 uv_Thickness = i.uv_texcoord * _Thickness_ST.xy + _Thickness_ST.zw;
         float2 uv_AO = i.uv_texcoord * _AO_ST.xy + _AO_ST.zw;
         float2 uv_Diffuse = i.uv_texcoord * _Diffuse_ST.xy + _Diffuse_ST.zw;
         float3 normalizeResult4_g1 = normalize( ( ase_worldViewDir + ase_worldlightDir ) );
         float3 temp_output_196_0 = normalizeResult4_g1;
         fixed3 temp_cast_3 = (_WrapperValue).xxx;
         fixed3 ase_worldNormal = WorldNormalVector( i, fixed3( 0, 0, 1 ) );
         UnityGI gi40 = gi;
         gi40 = UnityGI_Base( data, 1, ase_worldNormal );
         float3 indirectDiffuse40 = gi40.indirect.diffuse;
         fixed3 temp_cast_6 = (exp2( _RimPower )).xxx;
         float4 temp_output_107_0 = ( lerpResult82 * ( ( ( tex2D( _Thickness, uv_Thickness ) * _ThicknessAmount ) * ( ( tex2D( _AO, uv_AO ) * _AOamount ) * ( ( ( _MainColor * ( tex2D( _Diffuse, uv_Diffuse ) * tex2D( _ToonRamp, saturate( (temp_output_196_0*_WrapperValue + temp_cast_3) ).xy ) ) ) * ( _LightColor0 * fixed4( ( indirectDiffuse40 + ase_lightAtten ) , 0.0 ) ) ) + ( ( fixed4( saturate( ( ( ase_lightAtten * 0.0 ) * pow( ( 1.0 - saturate( ( temp_output_196_0 + _RimOffset ) ) ) , temp_cast_6 ) ) ) , 0.0 ) * ( _Color1 * _LightColor0 ) ) + ( i.vertexColor * _VertexColorAmount ) ) ) ) ) * _LightColor0 * ase_lightAtten ) );
         fixed3 temp_cast_8 = (_WrapperValue).xxx;
         fixed3 temp_cast_11 = (exp2( _RimPower )).xxx;
         #ifdef _TOGGLEBLINKING_ON
            float4 staticSwitch195 = ( lerpResult123 + temp_output_107_0 );
         #else
            float4 staticSwitch195 = temp_output_107_0;
         #endif
         float2 uv_NormalMap = i.uv_texcoord * _NormalMap_ST.xy + _NormalMap_ST.zw;
         float3 appendResult114 = (fixed3(( (tex2D( _NormalMap, uv_NormalMap )).rg * _NormalStrength ) , 1.0));
         c.rgb = ( staticSwitch195 * fixed4( appendResult114 , 0.0 ) ).rgb;
         c.a = 1;
         return c;
      }

      inline void LightingStandardCustomLighting_GI( inout SurfaceOutputCustomLightingCustom s, UnityGIInput data, inout UnityGI gi )
      {
         s.GIData = data;
      }

      void surf( Input i , inout SurfaceOutputCustomLightingCustom o )
      {
         o.SurfInput = i;
         o.Normal = float3(0,0,1);
      }

      ENDCG
      CGPROGRAM
      #pragma surface surf StandardCustomLighting keepalpha fullforwardshadows exclude_path:deferred

      ENDCG
      Pass
      {
         Name "ShadowCaster"
         Tags{ "LightMode" = "ShadowCaster" }
         ZWrite On
         CGPROGRAM
         #pragma vertex vert
         #pragma fragment frag
         #pragma target 3.0
         #pragma multi_compile_shadowcaster
         #pragma multi_compile UNITY_PASS_SHADOWCASTER
         #pragma skip_variants FOG_LINEAR FOG_EXP FOG_EXP2
         # include "HLSLSupport.cginc"
         #if ( SHADER_API_D3D11 || SHADER_API_GLCORE || SHADER_API_GLES3 || SHADER_API_METAL || SHADER_API_VULKAN )
            #define CAN_SKIP_VPOS
         #endif
         #include "UnityCG.cginc"
         #include "Lighting.cginc"
         #include "UnityPBSLighting.cginc"
         sampler3D _DitherMaskLOD;
         struct v2f
         {
            V2F_SHADOW_CASTER;
            float4 tSpace0 : TEXCOORD1;
            float4 tSpace1 : TEXCOORD2;
            float4 tSpace2 : TEXCOORD3;
            float4 texcoords01 : TEXCOORD4;
            UNITY_VERTEX_INPUT_INSTANCE_ID
         };
         v2f vert( appdata_full v )
         {
            v2f o;
            UNITY_SETUP_INSTANCE_ID( v );
            UNITY_INITIALIZE_OUTPUT( v2f, o );
            UNITY_TRANSFER_INSTANCE_ID( v, o );
            float3 worldPos = mul( unity_ObjectToWorld, v.vertex ).xyz;
            fixed3 worldNormal = UnityObjectToWorldNormal( v.normal );
            fixed3 worldTangent = UnityObjectToWorldDir( v.tangent.xyz );
            fixed tangentSign = v.tangent.w * unity_WorldTransformParams.w;
            fixed3 worldBinormal = cross( worldNormal, worldTangent ) * tangentSign;
            o.tSpace0 = float4( worldTangent.x, worldBinormal.x, worldNormal.x, worldPos.x );
            o.tSpace1 = float4( worldTangent.y, worldBinormal.y, worldNormal.y, worldPos.y );
            o.tSpace2 = float4( worldTangent.z, worldBinormal.z, worldNormal.z, worldPos.z );
            o.texcoords01 = float4( v.texcoord.xy, v.texcoord1.xy );
            TRANSFER_SHADOW_CASTER_NORMALOFFSET( o )
            return o;
         }
         fixed4 frag( v2f IN
         #if !defined( CAN_SKIP_VPOS )
         , UNITY_VPOS_TYPE vpos : VPOS
         #endif
         ) : SV_Target
         {
            UNITY_SETUP_INSTANCE_ID( IN );
            Input surfIN;
            UNITY_INITIALIZE_OUTPUT( Input, surfIN );
            surfIN.uv_texcoord.xy = IN.texcoords01.xy;
            float3 worldPos = float3( IN.tSpace0.w, IN.tSpace1.w, IN.tSpace2.w );
            fixed3 worldViewDir = normalize( UnityWorldSpaceViewDir( worldPos ) );
            surfIN.worldPos = worldPos;
            surfIN.worldNormal = float3( IN.tSpace0.z, IN.tSpace1.z, IN.tSpace2.z );
            surfIN.internalSurfaceTtoW0 = IN.tSpace0.xyz;
            surfIN.internalSurfaceTtoW1 = IN.tSpace1.xyz;
            surfIN.internalSurfaceTtoW2 = IN.tSpace2.xyz;
            SurfaceOutputCustomLightingCustom o;
            UNITY_INITIALIZE_OUTPUT( SurfaceOutputCustomLightingCustom, o )
            surf( surfIN, o );
            #if defined( CAN_SKIP_VPOS )
            float2 vpos = IN.pos;
            #endif
            SHADOW_CASTER_FRAGMENT( IN )
         }
         ENDCG
      }
   }
   Fallback "Diffuse"
   CustomEditor "ASEMaterialInspector"
}
/*ASEBEGIN
Version=13701
-1913;29;1350;988;-3569.348;288.1114;1;True;True
Node;AmplifyShaderEditor.CommentaryNode;2;-2399.7,430.5916;Float;False;1617.938;553.8222;;14;33;30;29;25;26;22;21;20;18;16;13;6;8;108;Rim Light;1,1,1,1;0;0
Node;AmplifyShaderEditor.RangedFloatNode;6;-2390.651,748.6102;Float;False;Property;_RimOffset;Rim Offset;3;0;0.24;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.FunctionNode;196;-2562.063,59.64466;Float;False;Blinn-Phong Half Vector;-1;;1;0;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;11;-2214.811,-488.8889;Float;False;723.599;290;Also know as Lambert Wrap or Half Lambert;2;17;12;Diffuse Wrap;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleAddOpNode;8;-2129.2,590.5917;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;15;-1942.809,-49.24195;Float;False;812;304;Comment;5;32;28;27;40;41;Attenuation and Ambient;1,1,1,1;0;0
Node;AmplifyShaderEditor.SaturateNode;13;-1951.7,590.5917;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.RangedFloatNode;12;-2188.228,-410.6395;Float;False;Property;_WrapperValue;Wrapper Value;0;0;0.5;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;16;-1998.632,795.4374;Float;False;Property;_RimPower;Rim Power;2;0;0.5;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.ScaleAndOffsetNode;17;-1847.81,-439.489;Float;False;3;0;FLOAT3;0,0,0;False;1;FLOAT;1.0;False;2;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.LightAttenuation;41;-1883.143,148.8212;Float;False;0;1;FLOAT
Node;AmplifyShaderEditor.OneMinusNode;18;-1775.7,590.5917;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.Exp2OpNode;108;-1644.759,801.3284;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;20;-1574.5,487.8914;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.PowerNode;21;-1583.7,590.5917;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.SaturateNode;19;-1590.138,-435.3419;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;49;-570.7978,501.1486;Float;False;500.1996;408.1997;// Add VertexColor;3;45;47;48; Add VertexColor;1,1,1,1;0;0
Node;AmplifyShaderEditor.SamplerNode;23;-1263.238,-462.2419;Float;True;Property;_ToonRamp;Toon Ramp;0;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.LightColorNode;26;-1323.377,884.0044;Float;False;0;3;COLOR;FLOAT3;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;25;-1343.7,558.5917;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT3;0;False;1;FLOAT3
Node;AmplifyShaderEditor.ColorNode;22;-1423.7,702.5917;Float;False;Property;_Color1;Color 1;1;1;[HDR];0,1,0.8758622,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.IndirectDiffuseLighting;40;-1717.387,78.29767;Float;False;Tangent;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SamplerNode;24;-1249.238,-696.3418;Float;True;Property;_Diffuse;Diffuse;4;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;1.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SaturateNode;30;-1151.7,558.5917;Float;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.CommentaryNode;97;1358.244,-1417.337;Float;False;1419.808;1280.744;// Radial Falloff;13;79;80;81;86;82;90;91;93;94;92;95;85;197;Radial Falloff;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleAddOpNode;27;-1448.809,118.758;Float;False;2;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.VertexColorNode;45;-520.7975,551.1486;Float;False;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;31;-881.7379,-591.2425;Float;False;2;2;0;COLOR;0.0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.ColorNode;52;-1151.631,-923.7466;Float;False;Property;_MainColor;MainColor;8;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.LightColorNode;28;-1879.968,-2.493788;Float;False;0;3;COLOR;FLOAT3;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;29;-1119.7,686.5917;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;48;-520.5981,767.9484;Float;False;Property;_VertexColorAmount;VertexColor Amount;7;0;0;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.FunctionNode;197;1546.691,-647.1498;Float;False;Blinn-Phong Half Vector;-1;;2;0;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;32;-1286.809,-1.241959;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT3;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;94;1557.585,-354.4078;Float;False;Property;_Falloff;Falloff;16;0;0;0;3;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;91;1526.445,-520.9108;Float;False;Property;_TransitionDistance;TransitionDistance;15;0;0;0;24;0;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;51;-367.2435,-793.1843;Float;False;751.2006;390.5006;// Add AO;3;43;36;42;;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;44;-652.2967,-544.5734;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;47;-239.5973,607.1481;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;135;2894.586,-525.0039;Float;False;1090.219;307.7491;// Pulse;6;128;129;139;140;141;123;Pulse;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;33;-959.7,558.5917;Float;False;2;2;0;FLOAT3;0,0,0;False;1;COLOR;0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.Exp2OpNode;93;2088.619,-348.7776;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleDivideOpNode;90;1885.954,-653.8613;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;34;-494.4621,-27.30714;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleAddOpNode;46;-258.0342,97.30165;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SamplerNode;36;-325.0435,-734.7844;Float;True;Property;_AO;AO;5;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;128;2901.855,-477.0793;Float;False;Property;_PulseSpeed;PulseSpeed;23;0;0;0;60;0;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;43;-306.7406,-493.6838;Float;False;Property;_AOamount;AOamount;6;0;0;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;57;429.6628,-784.285;Float;False;603.9003;457.7006;// Add Thickness;3;54;53;55;;1,1,1,1;0;0
Node;AmplifyShaderEditor.SimpleTimeNode;129;3093.193,-313.1115;Float;False;1;0;FLOAT;1.0;False;1;FLOAT
Node;AmplifyShaderEditor.RangedFloatNode;55;490.1632,-441.5843;Float;False;Property;_ThicknessAmount;ThicknessAmount;6;0;0;0;10;0;1;FLOAT
Node;AmplifyShaderEditor.SamplerNode;54;464.6628,-731.285;Float;True;Property;_Thickness;Thickness;5;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleAddOpNode;35;-24.33023,-23.65559;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.WireNode;102;383.255,192.2686;Float;False;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;42;161.9571,-599.8834;Float;False;2;2;0;COLOR;0.0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.PowerNode;92;2050.727,-657.7778;Float;False;2;0;FLOAT3;0,0,0;False;1;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.ColorNode;79;1392.054,-1164.083;Float;False;Property;_NearColor;NearColor;14;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.WireNode;101;1027.341,-1047.526;Float;False;1;0;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;50;543.0836,39.31131;Float;False;2;2;0;COLOR;0.0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.RangedFloatNode;85;1936.89,-1137.457;Float;False;Property;_VertexAmount_Falloff;VertexAmount_Falloff;15;0;0;0;1;0;1;FLOAT
Node;AmplifyShaderEditor.ClampOpNode;95;2271.61,-653.9889;Float;False;3;0;FLOAT3;0,0,0;False;1;FLOAT3;0.0,0,0;False;2;FLOAT3;1.0,0,0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;140;3253.568,-410.715;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;192;1273.052,-39.3274;Float;False;561.0262;362.5238;// Final Lighting;3;190;191;189;;1,1,1,1;0;0
Node;AmplifyShaderEditor.ColorNode;80;1393.3,-966.3401;Float;False;Property;_FarColor;FarColor;15;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;53;864.5636,-482.7848;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;56;1033.348,22.97939;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SinOpNode;139;3429.9,-402.7349;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
Node;AmplifyShaderEditor.CommentaryNode;136;3121.565,-1145.422;Float;False;1329.835;465.5912;// Glow;2;124;142;Glow;1,1,1,1;0;0
Node;AmplifyShaderEditor.LightAttenuation;190;1330.052,213.1964;Float;False;0;1;FLOAT
Node;AmplifyShaderEditor.LightColorNode;191;1323.052,121.1964;Float;False;0;3;COLOR;FLOAT3;FLOAT
Node;AmplifyShaderEditor.LerpOp;81;1806.204,-983.6225;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;86;2264.163,-1217.297;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.CommentaryNode;116;2378.95,394.9289;Float;False;1218.011;472.2495;// Add Normal;6;113;111;115;112;114;110;Add Normal;1,1,1,1;0;0
Node;AmplifyShaderEditor.ColorNode;124;3204.336,-1095.421;Float;False;Property;_BlinkColor1;BlinkColor1;21;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;189;1665.078,10.6726;Float;False;3;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.LerpOp;82;2495.842,-850.6684;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.ColorNode;142;3211.413,-896.3698;Float;False;Property;_BlinkColor2;BlinkColor2;23;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.SamplerNode;110;2399.956,462.7282;Float;True;Property;_NormalMap;NormalMap;19;0;None;True;0;True;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
Node;AmplifyShaderEditor.TFHCRemapNode;141;3603.731,-394.2177;Float;False;5;0;FLOAT;0.0;False;1;FLOAT;-1.0;False;2;FLOAT;1.0;False;3;FLOAT;0.0;False;4;FLOAT;1.0;False;1;FLOAT
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;107;2785.998,-6.170811;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.ComponentMaskNode;111;2799.784,493.328;Float;True;True;True;False;False;1;0;COLOR;0,0,0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;113;2631.683,752.1784;Float;False;Property;_NormalStrength;Normal Strength;20;0;0;1;10;0;1;FLOAT
Node;AmplifyShaderEditor.LerpOp;123;3792.864,-473.5222;Float;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleAddOpNode;193;3563.518,14.36576;Float;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;112;3178.057,576.16;Float;False;2;2;0;FLOAT2;0,0;False;1;FLOAT;0,0;False;1;FLOAT2
Node;AmplifyShaderEditor.RangedFloatNode;115;3221.694,736.4588;Float;False;Constant;_Float0;Float 0;21;0;1;0;0;0;1;FLOAT
Node;AmplifyShaderEditor.StaticSwitch;195;3711.173,172.4918;Float;False;Property;_ToggleBlinking;Toggle Blinking;23;0;0;False;True;;2;0;COLOR;0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.DynamicAppendNode;114;3429.96,564.3941;Float;False;FLOAT3;4;0;FLOAT2;0,0;False;1;FLOAT;0.0;False;2;FLOAT;0.0;False;3;FLOAT;0.0;False;1;FLOAT3
Node;AmplifyShaderEditor.SimpleMultiplyOpNode;194;4121.967,180.1915;Float;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT3;0,0,0,0;False;1;COLOR
Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;4470.797,52.78987;Fixed;False;True;2;Fixed;ASEMaterialInspector;0;0;CustomLighting;ASE/ASE_CustomRimLighting;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Off;0;0;False;0;0;Opaque;0.5;True;True;0;False;Opaque;Geometry;ForwardOnly;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;False;0;255;255;0;0;0;0;0;0;0;0;False;0;4;10;25;False;0.5;True;0;Zero;Zero;0;Zero;Zero;Add;Add;0;False;0;0,0,0,0;VertexOffset;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;0;0;False;14;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0.0;False;4;FLOAT;0.0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0.0;False;10;FLOAT;0.0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
WireConnection;8;0;196;0
WireConnection;8;1;6;0
WireConnection;13;0;8;0
WireConnection;17;0;196;0
WireConnection;17;1;12;0
WireConnection;17;2;12;0
WireConnection;18;0;13;0
WireConnection;108;0;16;0
WireConnection;20;0;41;0
WireConnection;21;0;18;0
WireConnection;21;1;108;0
WireConnection;19;0;17;0
WireConnection;23;1;19;0
WireConnection;25;0;20;0
WireConnection;25;1;21;0
WireConnection;30;0;25;0
WireConnection;27;0;40;0
WireConnection;27;1;41;0
WireConnection;31;0;24;0
WireConnection;31;1;23;0
WireConnection;29;0;22;0
WireConnection;29;1;26;0
WireConnection;32;0;28;0
WireConnection;32;1;27;0
WireConnection;44;0;52;0
WireConnection;44;1;31;0
WireConnection;47;0;45;0
WireConnection;47;1;48;0
WireConnection;33;0;30;0
WireConnection;33;1;29;0
WireConnection;93;0;94;0
WireConnection;90;0;197;0
WireConnection;90;1;91;0
WireConnection;34;0;44;0
WireConnection;34;1;32;0
WireConnection;46;0;33;0
WireConnection;46;1;47;0
WireConnection;129;0;128;0
WireConnection;35;0;34;0
WireConnection;35;1;46;0
WireConnection;102;0;45;0
WireConnection;42;0;36;0
WireConnection;42;1;43;0
WireConnection;92;0;90;0
WireConnection;92;1;93;0
WireConnection;101;0;102;0
WireConnection;50;0;42;0
WireConnection;50;1;35;0
WireConnection;95;0;92;0
WireConnection;140;0;128;0
WireConnection;140;1;129;0
WireConnection;53;0;54;0
WireConnection;53;1;55;0
WireConnection;56;0;53;0
WireConnection;56;1;50;0
WireConnection;139;0;140;0
WireConnection;81;0;79;0
WireConnection;81;1;80;0
WireConnection;81;2;95;0
WireConnection;86;0;101;0
WireConnection;86;1;85;0
WireConnection;189;0;56;0
WireConnection;189;1;191;0
WireConnection;189;2;190;0
WireConnection;82;0;86;0
WireConnection;82;1;81;0
WireConnection;82;2;95;0
WireConnection;141;0;139;0
WireConnection;107;0;82;0
WireConnection;107;1;189;0
WireConnection;111;0;110;0
WireConnection;123;0;124;0
WireConnection;123;1;142;0
WireConnection;123;2;141;0
WireConnection;193;0;123;0
WireConnection;193;1;107;0
WireConnection;112;0;111;0
WireConnection;112;1;113;0
WireConnection;195;0;193;0
WireConnection;195;1;107;0
WireConnection;114;0;112;0
WireConnection;114;2;115;0
WireConnection;194;0;195;0
WireConnection;194;1;114;0
WireConnection;0;2;194;0
ASEEND*/
//CHKSM=F076F65C6E1840E8226E814F91739766342E64C0

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Mon Nov 27, 2017 9:03 pm
by GDoll
Hi Thank you for the update. Apologies for my late replay.
The update did not quite solve the issue regarding the shadows on the object. They still look jiggered and not very smooth. I think it might be something wrong in my shader code, specifically with the normals. :?

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Tue Nov 28, 2017 11:32 am
by Amplify_Borba
Unfortunately, we can't seem to replicate this problem on our side.

Would it be possible for you to send us a simple scene with the issue present in order for us to debug it? You may send it directly to [email protected] and we'll take it on from there, thanks!

Looking forward to your reply!

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Fri Dec 08, 2017 7:44 pm
by GDoll
Dear Amplify team,
I just send an email attached with a simple scene depicting the issue. Thank you! :)

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Mon Dec 11, 2017 11:33 am
by Amplify_Borba
GDoll wrote:Dear Amplify team,
I just send an email attached with a simple scene depicting the issue. Thank you! :)


Thank you GDoll, we're received your email and are going to investigate the issue, we appreciate that you took the time to send us a sample and will get back to you as soon as we have any developments, thanks!

Re: Shadows not smooth in Custom Lighting shader

PostPosted: Mon Dec 11, 2017 10:05 pm
by GDoll
Thank you for the great support guys! I really appreciate this :D