AnimatedFire.shader 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "ASESampleShaders/AnimatedFire"
  4. {
  5. Properties
  6. {
  7. _Albedo("Albedo", 2D) = "white" {}
  8. _Normals("Normals", 2D) = "bump" {}
  9. _Mask("Mask", 2D) = "white" {}
  10. _TileableFire("TileableFire", 2D) = "white" {}
  11. _FireIntensity("FireIntensity", Range( 0 , 2)) = 0
  12. _Smoothness("Smoothness", Float) = 1
  13. _Color0("Color 0", Color) = (0,0,0,0)
  14. _SpeCol("SpeCol", Color) = (0,0,0,0)
  15. _Gloss("Gloss", Float) = 20
  16. _Vector0("Vector 0", Vector) = (1,1,0,0)
  17. _TileSpeed1("TileSpeed1", Float) = 0
  18. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  19. [HideInInspector] __dirty( "", Int ) = 1
  20. }
  21. SubShader
  22. {
  23. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" "IsEmissive" = "true" }
  24. Cull Back
  25. CGPROGRAM
  26. #include "UnityShaderVariables.cginc"
  27. #include "UnityCG.cginc"
  28. #pragma target 3.0
  29. #pragma surface surf StandardSpecular keepalpha
  30. struct Input
  31. {
  32. float2 uv_texcoord;
  33. float3 worldPos;
  34. float3 worldNormal;
  35. INTERNAL_DATA
  36. };
  37. uniform sampler2D _Normals;
  38. uniform float4 _Normals_ST;
  39. uniform float4 _Color0;
  40. uniform sampler2D _Albedo;
  41. uniform float4 _Albedo_ST;
  42. uniform sampler2D _Mask;
  43. uniform float4 _Mask_ST;
  44. uniform sampler2D _TileableFire;
  45. uniform float _TileSpeed1;
  46. uniform float2 _Vector0;
  47. uniform float _FireIntensity;
  48. uniform float _Gloss;
  49. uniform float4 _SpeCol;
  50. uniform float _Smoothness;
  51. void surf( Input i , inout SurfaceOutputStandardSpecular o )
  52. {
  53. float2 uv_Normals = i.uv_texcoord * _Normals_ST.xy + _Normals_ST.zw;
  54. o.Normal = UnpackNormal( tex2D( _Normals, uv_Normals ) );
  55. float2 uv_Albedo = i.uv_texcoord * _Albedo_ST.xy + _Albedo_ST.zw;
  56. o.Albedo = ( _Color0 * tex2D( _Albedo, uv_Albedo ) ).rgb;
  57. float2 uv_Mask = i.uv_texcoord * _Mask_ST.xy + _Mask_ST.zw;
  58. float2 temp_cast_1 = (_TileSpeed1).xx;
  59. float2 uv_TexCoord6 = i.uv_texcoord * _Vector0;
  60. float2 panner16 = ( _Time.x * temp_cast_1 + uv_TexCoord6);
  61. o.Emission = ( ( tex2D( _Mask, uv_Mask ) * tex2D( _TileableFire, panner16 ) ) * ( _FireIntensity * ( _SinTime.w + 1.5 ) ) ).rgb;
  62. //float3 ase_worldPos = i.worldPos;
  63. /*
  64. #if defined(LIGHTMAP_ON) && UNITY_VERSION < 560 //aseld
  65. //float3 ase_worldlightDir = 0;
  66. //#else //aseld
  67. //float3 ase_worldlightDir = normalize( UnityWorldSpaceLightDir( ase_worldPos ) );
  68. #endif //aseld
  69. //float3 ase_worldNormal = WorldNormalVector( i, float3( 0, 0, 1 ) );
  70. //float3 normalizeResult25 = normalize( reflect( ( 1.0 - ase_worldlightDir ) , ase_worldNormal ) );
  71. //float3 ase_worldViewDir = normalize( UnityWorldSpaceViewDir( ase_worldPos ) );
  72. //float dotResult27 = dot( normalizeResult25 , ase_worldViewDir );
  73. #if defined(LIGHTMAP_ON) && ( UNITY_VERSION < 560 || ( defined(LIGHTMAP_SHADOW_MIXING) && !defined(SHADOWS_SHADOWMASK) && defined(SHADOWS_SCREEN) ) )//aselc
  74. float4 ase_lightColor = 0;
  75. #else //aselc
  76. float4 ase_lightColor = _LightColor0;
  77. #endif //aselc
  78. //o.Specular = ( pow( saturate( dotResult27 ) , _Gloss ) * ( _SpeCol * ase_lightColor ) ).rgb;
  79. */
  80. o.Smoothness = _Smoothness;
  81. o.Alpha = 1;
  82. }
  83. ENDCG
  84. }
  85. Fallback "Diffuse"
  86. CustomEditor "ASEMaterialInspector"
  87. }
  88. /*ASEBEGIN
  89. Version=18703
  90. 119.2;424.8;1280;707;2219.262;905.2773;1;False;False
  91. Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode;21;-3331.719,-1071.84;Inherit;False;False;1;0;FLOAT;0;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  92. Node;AmplifyShaderEditor.OneMinusNode;22;-3027.719,-1055.84;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
  93. Node;AmplifyShaderEditor.WorldNormalVector;23;-3283.719,-879.8403;Inherit;False;False;1;0;FLOAT3;0,0,1;False;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  94. Node;AmplifyShaderEditor.Vector2Node;36;-1770.87,274.9007;Inherit;False;Property;_Vector0;Vector 0;9;0;Create;True;0;0;False;0;False;1,1;2,2;0;3;FLOAT2;0;FLOAT;1;FLOAT;2
  95. Node;AmplifyShaderEditor.ReflectOpNode;24;-2787.719,-959.8403;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT3;0
  96. Node;AmplifyShaderEditor.ViewDirInputsCoordNode;26;-2611.719,-687.8402;Inherit;False;World;False;0;4;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3
  97. Node;AmplifyShaderEditor.TimeNode;5;-1446.284,608.0052;Inherit;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  98. Node;AmplifyShaderEditor.RangedFloatNode;37;-1729.573,490.0925;Inherit;False;Property;_TileSpeed1;TileSpeed1;10;0;Create;True;0;0;False;0;False;0;1;0;0;0;1;FLOAT;0
  99. Node;AmplifyShaderEditor.TextureCoordinatesNode;6;-1462.284,268.0052;Inherit;False;0;-1;2;3;2;SAMPLER2D;;False;0;FLOAT2;1,1;False;1;FLOAT2;0,0;False;5;FLOAT2;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  100. Node;AmplifyShaderEditor.NormalizeNode;25;-2579.719,-959.8403;Inherit;False;1;0;FLOAT3;0,0,0;False;1;FLOAT3;0
  101. Node;AmplifyShaderEditor.PannerNode;16;-1054.487,487.2885;Inherit;False;3;0;FLOAT2;0,0;False;2;FLOAT2;-1,0;False;1;FLOAT;1;False;1;FLOAT2;0
  102. Node;AmplifyShaderEditor.DotProductOpNode;27;-2355.719,-783.8402;Inherit;False;2;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;1;FLOAT;0
  103. Node;AmplifyShaderEditor.SinTimeNode;9;-558.3345,758.2137;Inherit;False;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  104. Node;AmplifyShaderEditor.SamplerNode;2;-1022.689,-102.85;Inherit;True;Property;_Mask;Mask;2;0;Create;True;0;0;False;0;False;-1;None;5228a04ef529d2641937cab585cc1a02;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;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
  105. Node;AmplifyShaderEditor.SamplerNode;1;-822.3178,306.8356;Inherit;True;Property;_TileableFire;TileableFire;3;0;Create;True;0;0;False;0;False;-1;None;004848139859b6c40a1266ac444b2c8b;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;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
  106. Node;AmplifyShaderEditor.SimpleAddOpNode;11;-356.3341,774.2137;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;1.5;False;1;FLOAT;0
  107. Node;AmplifyShaderEditor.RangedFloatNode;7;-503.3344,628.2137;Float;False;Property;_FireIntensity;FireIntensity;4;0;Create;True;0;0;False;0;False;0;0.44;0;2;0;1;FLOAT;0
  108. Node;AmplifyShaderEditor.SaturateNode;28;-2179.719,-783.8402;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  109. Node;AmplifyShaderEditor.LightColorNode;32;-2275.719,-31.8409;Inherit;False;0;3;COLOR;0;FLOAT3;1;FLOAT;2
  110. Node;AmplifyShaderEditor.RangedFloatNode;30;-2179.719,-511.84;Inherit;False;Property;_Gloss;Gloss;8;0;Create;True;0;0;False;0;False;20;1.8;0;0;0;1;FLOAT;0
  111. Node;AmplifyShaderEditor.ColorNode;31;-2275.719,-287.8406;Inherit;False;Property;_SpeCol;SpeCol;7;0;Create;True;0;0;False;0;False;0,0,0,0;0.3679245,0.3106532,0.3106532,0;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  112. Node;AmplifyShaderEditor.SamplerNode;12;-815.1123,-691.8842;Inherit;True;Property;_Albedo;Albedo;0;0;Create;True;0;0;False;0;False;-1;None;3c795c08cbca541408b06daae1654ca3;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;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
  113. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;10;-133,322.5;Inherit;True;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  114. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;3;-283,123.5;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  115. Node;AmplifyShaderEditor.PowerNode;29;-1987.719,-639.84;Inherit;False;False;2;0;FLOAT;0;False;1;FLOAT;1;False;1;FLOAT;0
  116. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;33;-1987.719,-111.8409;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  117. Node;AmplifyShaderEditor.ColorNode;18;-695.8615,-908.462;Inherit;False;Property;_Color0;Color 0;6;0;Create;True;0;0;False;0;False;0,0,0,0;0,0.2410946,0.6415094,0.854902;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  118. Node;AmplifyShaderEditor.SamplerNode;14;-489.0148,-470.9085;Inherit;True;Property;_Normals;Normals;1;0;Create;True;0;0;False;0;False;-1;None;62799fa6a1793b04eadc92c5bde83f32;True;0;True;bump;Auto;True;Object;-1;Auto;Texture2D;8;0;SAMPLER2D;0,0;False;1;FLOAT2;0,0;False;2;FLOAT;1;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1;False;6;FLOAT;0;False;7;SAMPLERSTATE;;False;5;FLOAT3;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  119. Node;AmplifyShaderEditor.FunctionNode;38;-1024.554,121.2531;Inherit;False;Flipbook;-1;;1;53c2488c220f6564ca6c90721ee16673;2,71,0,68,0;8;51;SAMPLER2D;0.0;False;13;FLOAT2;0,0;False;4;FLOAT;3;False;5;FLOAT;3;False;24;FLOAT;0;False;2;FLOAT;0;False;55;FLOAT;0;False;70;FLOAT;0;False;5;COLOR;53;FLOAT2;0;FLOAT;47;FLOAT;48;FLOAT;62
  120. Node;AmplifyShaderEditor.RangedFloatNode;15;-103.6802,631.7675;Float;False;Property;_Smoothness;Smoothness;5;0;Create;True;0;0;False;0;False;1;4;0;0;0;1;FLOAT;0
  121. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;8;-96,123.5;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;FLOAT;0;False;1;COLOR;0
  122. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;35;-1655.09,-570.7445;Inherit;False;2;2;0;FLOAT;0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  123. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;19;-387.1488,-874.0075;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  124. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;271.8964,-66.24101;Float;False;True;-1;2;ASEMaterialInspector;0;0;StandardSpecular;ASESampleShaders/AnimatedFire;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;False;-1;0;False;-1;False;0;False;-1;0;False;-1;False;0;Opaque;0.5;True;False;0;False;Opaque;;Geometry;All;14;all;True;True;True;True;0;False;-1;False;0;False;-1;255;False;-1;255;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;-1;False;0;4;10;25;False;0.5;True;0;0;False;-1;0;False;-1;0;0;False;-1;0;False;-1;1;False;-1;1;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;-1;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;False;16;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT3;0,0,0;False;4;FLOAT;0;False;5;FLOAT;0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0,0,0;False;8;FLOAT;0;False;9;FLOAT;0;False;10;FLOAT;0;False;13;FLOAT3;0,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
  125. WireConnection;22;0;21;0
  126. WireConnection;24;0;22;0
  127. WireConnection;24;1;23;0
  128. WireConnection;6;0;36;0
  129. WireConnection;25;0;24;0
  130. WireConnection;16;0;6;0
  131. WireConnection;16;2;37;0
  132. WireConnection;16;1;5;1
  133. WireConnection;27;0;25;0
  134. WireConnection;27;1;26;0
  135. WireConnection;1;1;16;0
  136. WireConnection;11;0;9;4
  137. WireConnection;28;0;27;0
  138. WireConnection;10;0;7;0
  139. WireConnection;10;1;11;0
  140. WireConnection;3;0;2;0
  141. WireConnection;3;1;1;0
  142. WireConnection;29;0;28;0
  143. WireConnection;29;1;30;0
  144. WireConnection;33;0;31;0
  145. WireConnection;33;1;32;0
  146. WireConnection;8;0;3;0
  147. WireConnection;8;1;10;0
  148. WireConnection;35;0;29;0
  149. WireConnection;35;1;33;0
  150. WireConnection;19;0;18;0
  151. WireConnection;19;1;12;0
  152. WireConnection;0;0;19;0
  153. WireConnection;0;1;14;0
  154. WireConnection;0;2;8;0
  155. WireConnection;0;3;35;0
  156. WireConnection;0;4;15;0
  157. ASEEND*/
  158. //CHKSM=58AA8CB334343BAA8F14F06C38FA7E41C3DAC033