Seven is the number.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
6.6 KiB

4 years ago
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "Custom/Atmosphere sun"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] __dirty( "", Int ) = 1
  8. _MaskClipValue( "Mask Clip Value", Float ) = 0
  9. _Atmospheresize("Atmosphere size", Range( 0 , 10)) = 0
  10. _Atmospherecolor("Atmosphere color", Color) = (1,1,1,0)
  11. _Atmosphereintensity("Atmosphere intensity", Range( 0 , 10)) = 3.041
  12. _Atmospherepower("Atmosphere power", Range( 1 , 20)) = 0
  13. _Atmospherecircle("Atmosphere circle", Range( 0 , 1)) = 0
  14. }
  15. SubShader
  16. {
  17. Tags{ "RenderType" = "Overlay" "Queue" = "Overlay+0" "IsEmissive" = "true" }
  18. Cull Front
  19. ZWrite Off
  20. Blend One One
  21. BlendOp Add
  22. CGPROGRAM
  23. #include "UnityCG.cginc"
  24. #pragma target 3.0
  25. #pragma surface surf Lambert keepalpha noshadow noambient nofog vertex:vertexDataFunc
  26. struct Input
  27. {
  28. float3 worldPos;
  29. float3 worldNormal;
  30. INTERNAL_DATA
  31. float3 viewDir;
  32. };
  33. uniform float4 _Atmospherecolor;
  34. uniform float _Atmosphereintensity;
  35. uniform float _Atmospherepower;
  36. uniform float _Atmospherecircle;
  37. uniform float _Atmospheresize;
  38. uniform float _MaskClipValue = 0;
  39. void vertexDataFunc( inout appdata_full v, out Input o )
  40. {
  41. UNITY_INITIALIZE_OUTPUT( Input, o );
  42. v.vertex.xyz += ( v.normal * _Atmospheresize );
  43. }
  44. void surf( Input i , inout SurfaceOutput o )
  45. {
  46. float temp_output_32_0 = pow( (0.0 + (-dot( i.worldNormal , i.viewDir ) - 0.0) * (_Atmosphereintensity - 0.0) / (1.0 - 0.0)) , _Atmospherepower );
  47. o.Emission = ( _Atmospherecolor * clamp( lerp( ( dot( UnityWorldSpaceLightDir( i.worldPos ) , i.worldNormal ) * temp_output_32_0 ) , temp_output_32_0 , _Atmospherecircle ) , 0.0 , 1.0 ) ).rgb;
  48. o.Alpha = 1;
  49. }
  50. ENDCG
  51. }
  52. CustomEditor "ASEMaterialInspector"
  53. }
  54. /*ASEBEGIN
  55. Version=6001
  56. 1927;29;1906;1004;1540.509;526.6303;1.6;True;True
  57. Node;AmplifyShaderEditor.CommentaryNode;46;-967.4506,101.3996;Float;False;1475.601;411.5002;Hand made fresnel ;10;25;24;29;28;26;27;32;33;30;51;
  58. Node;AmplifyShaderEditor.WorldNormalVector;24;-917.4506,151.3996;Float;False;0;FLOAT3;0,0,0;False;FLOAT3;FLOAT;FLOAT;FLOAT
  59. Node;AmplifyShaderEditor.ViewDirInputsCoordNode;25;-891.1507,289.0996;Float;False;World;FLOAT3;FLOAT;FLOAT;FLOAT
  60. Node;AmplifyShaderEditor.DotProductOpNode;26;-669.5507,153.0999;Float;True;0;FLOAT3;0.0;False;1;FLOAT3;0,0,0;False;FLOAT
  61. Node;AmplifyShaderEditor.CommentaryNode;47;-49.14934,-401.8528;Float;False;541.457;360.2413;light mask on direction;3;16;40;14;
  62. Node;AmplifyShaderEditor.NegateNode;51;-442.4108,140.8691;Float;False;0;FLOAT;0.0;False;FLOAT
  63. Node;AmplifyShaderEditor.RangedFloatNode;28;-459.3501,242.8998;Float;False;Constant;_Float1;Float 1;1;0;0;0;0;FLOAT
  64. Node;AmplifyShaderEditor.RangedFloatNode;29;-456.3501,316.8998;Float;False;Constant;_Float2;Float 2;1;0;1;0;0;FLOAT
  65. Node;AmplifyShaderEditor.RangedFloatNode;30;-582.3503,397.8998;Float;False;Property;_Atmosphereintensity;Atmosphere intensity;2;0;3.041;0;10;FLOAT
  66. Node;AmplifyShaderEditor.WorldNormalVector;14;18.46293,-222.7618;Float;False;0;FLOAT3;0,0,0;False;FLOAT3;FLOAT;FLOAT;FLOAT
  67. Node;AmplifyShaderEditor.WorldSpaceLightDirHlpNode;40;0.8506591,-351.8528;Float;False;0;FLOAT;0.0;False;FLOAT3
  68. Node;AmplifyShaderEditor.TFHCRemap;27;-244.6504,175.3999;Float;True;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;1.0;False;3;FLOAT;0.0;False;4;FLOAT;1.0;False;FLOAT
  69. Node;AmplifyShaderEditor.RangedFloatNode;33;18.95053,251.2991;Float;False;Property;_Atmospherepower;Atmosphere power;3;0;0;1;20;FLOAT
  70. Node;AmplifyShaderEditor.CommentaryNode;48;622.9507,-180.2;Float;False;562.6014;474.4;Control over either fresnel or directional light;3;42;41;37;
  71. Node;AmplifyShaderEditor.DotProductOpNode;16;257.3077,-294.6115;Float;True;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;FLOAT
  72. Node;AmplifyShaderEditor.PowerNode;32;328.1508,184.2999;Float;False;0;FLOAT;0.0;False;1;FLOAT;0.0;False;FLOAT
  73. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;37;699.3507,-130.2;Float;True;0;FLOAT;0.0,0,0,0;False;1;FLOAT;0.0;False;FLOAT
  74. Node;AmplifyShaderEditor.RangedFloatNode;42;672.9507,179.1999;Float;False;Property;_Atmospherecircle;Atmosphere circle;4;0;0;0;1;FLOAT
  75. Node;AmplifyShaderEditor.CommentaryNode;45;1028.8,393.4002;Float;False;627.8995;345.7003;Vertex offset;3;9;8;7;
  76. Node;AmplifyShaderEditor.CommentaryNode;49;1253.751,-203.5001;Float;False;450.9996;382.0001;Color control;3;43;34;35;
  77. Node;AmplifyShaderEditor.LerpOp;41;1001.552,5.299968;Float;False;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;0.0;False;FLOAT
  78. Node;AmplifyShaderEditor.RangedFloatNode;7;1078.8,602.9006;Float;False;Property;_Atmospheresize;Atmosphere size;0;0;0;0;10;FLOAT
  79. Node;AmplifyShaderEditor.ColorNode;35;1303.751,-153.5;Float;False;Property;_Atmospherecolor;Atmosphere color;1;0;1,1,1,0;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
  80. Node;AmplifyShaderEditor.ClampOpNode;43;1319.151,22.49998;Float;False;0;FLOAT;0.0;False;1;FLOAT;0.0;False;2;FLOAT;1.0;False;FLOAT
  81. Node;AmplifyShaderEditor.NormalVertexDataNode;8;1156.401,443.4003;Float;False;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT
  82. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;34;1535.75,-17.80019;Float;False;0;COLOR;0.0;False;1;FLOAT;0.0,0,0,0;False;COLOR
  83. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;9;1421.7,486.1007;Float;True;0;FLOAT3;0.0;False;1;FLOAT;0.0,0,0;False;FLOAT3
  84. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;2059,87.49983;Float;False;True;2;Float;ASEMaterialInspector;Lambert;Custom/Atmosphere sun;False;False;False;False;True;False;False;False;False;True;False;False;Front;2;0;False;100000;100000;Custom;0;True;False;0;True;Overlay;Overlay;All;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;True;False;100;255;255;2;1;1;1;False;0;4;10;25;False;0.5;False;4;One;One;0;Zero;Zero;Add;Add;0;False;0;0,0,0,0;VertexOffset;False;Cylindrical;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;OBJECT;0.0;False;11;FLOAT3;0,0,0;False;12;FLOAT3;0,0,0;False;13;OBJECT;0.0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False
  85. WireConnection;26;0;24;0
  86. WireConnection;26;1;25;0
  87. WireConnection;51;0;26;0
  88. WireConnection;27;0;51;0
  89. WireConnection;27;1;28;0
  90. WireConnection;27;2;29;0
  91. WireConnection;27;3;28;0
  92. WireConnection;27;4;30;0
  93. WireConnection;16;0;40;0
  94. WireConnection;16;1;14;0
  95. WireConnection;32;0;27;0
  96. WireConnection;32;1;33;0
  97. WireConnection;37;0;16;0
  98. WireConnection;37;1;32;0
  99. WireConnection;41;0;37;0
  100. WireConnection;41;1;32;0
  101. WireConnection;41;2;42;0
  102. WireConnection;43;0;41;0
  103. WireConnection;34;0;35;0
  104. WireConnection;34;1;43;0
  105. WireConnection;9;0;8;0
  106. WireConnection;9;1;7;0
  107. WireConnection;0;2;34;0
  108. WireConnection;0;11;9;0
  109. ASEEND*/
  110. //CHKSM=ACCD1E356A916D6EDB276D76B316029AF79090C0