RO_Effect_Fresnel_01.shader 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "RO/RO_Effect_Fresnel_01"
  4. {
  5. Properties
  6. {
  7. [HDR]_Color0("Color 0", Color) = (1,1,1,0)
  8. [HDR]_Color1("Color 1", Color) = (0,0,0,0)
  9. _Vector0("Vector 0", Vector) = (1,0,0,0)
  10. [HideInInspector] __dirty( "", Int ) = 1
  11. }
  12. SubShader
  13. {
  14. Tags{ "RenderType" = "Custom" "Queue" = "Transparent+0" "IsEmissive" = "true" }
  15. Cull Back
  16. ZWrite Off
  17. ZTest LEqual
  18. Blend SrcAlpha OneMinusSrcAlpha
  19. CGPROGRAM
  20. #pragma target 3.0
  21. #pragma surface surf Unlit keepalpha noshadow noambient novertexlights nolightmap nodynlightmap nodirlightmap nometa noforwardadd
  22. struct Input
  23. {
  24. float4 vertexColor : COLOR;
  25. float3 worldPos;
  26. float3 worldNormal;
  27. };
  28. uniform float4 _Color0;
  29. uniform float4 _Color1;
  30. uniform float4 _Vector0;
  31. inline half4 LightingUnlit( SurfaceOutput s, half3 lightDir, half atten )
  32. {
  33. return half4 ( 0, 0, 0, s.Alpha );
  34. }
  35. void surf( Input i , inout SurfaceOutput o )
  36. {
  37. float3 ase_worldPos = i.worldPos;
  38. float3 ase_worldViewDir = normalize( UnityWorldSpaceViewDir( ase_worldPos ) );
  39. float3 ase_worldNormal = i.worldNormal;
  40. float fresnelNdotV16 = dot( ase_worldNormal, ase_worldViewDir );
  41. float fresnelNode16 = ( 0.0 + 1.0 * pow( 1.0 - fresnelNdotV16, _Vector0.x ) );
  42. float4 lerpResult20 = lerp( _Color0 , _Color1 , ( saturate( fresnelNode16 ) * _Vector0.y ));
  43. float4 temp_output_23_0 = saturate( lerpResult20 );
  44. o.Emission = ( i.vertexColor * temp_output_23_0 ).rgb;
  45. o.Alpha = ( i.vertexColor.a * (temp_output_23_0).a );
  46. }
  47. ENDCG
  48. }
  49. CustomEditor "ASEMaterialInspector"
  50. }
  51. /*ASEBEGIN
  52. Version=18100
  53. 2389;7;1442;1004;-2798.578;-143.2004;1.482496;True;True
  54. Node;AmplifyShaderEditor.Vector4Node;99;2991.504,1103.999;Inherit;False;Property;_Vector0;Vector 0;3;0;Create;True;0;0;False;0;False;1,0,0,0;1.61,1.27,0.64,0;0;5;FLOAT4;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  55. Node;AmplifyShaderEditor.FresnelNode;16;3236.217,775.1404;Inherit;True;Standard;WorldNormal;ViewDir;False;False;5;0;FLOAT3;0,0,1;False;4;FLOAT3;0,0,0;False;1;FLOAT;0;False;2;FLOAT;1;False;3;FLOAT;5;False;1;FLOAT;0
  56. Node;AmplifyShaderEditor.SaturateNode;143;3570.351,811.622;Inherit;False;1;0;FLOAT;0;False;1;FLOAT;0
  57. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;19;3752.899,882.8539;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  58. Node;AmplifyShaderEditor.ColorNode;21;3498.11,239.5145;Inherit;False;Property;_Color0;Color 0;1;1;[HDR];Create;True;0;0;False;0;False;1,1,1,0;0,0.02731139,0.08876202,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  59. Node;AmplifyShaderEditor.ColorNode;22;3492.188,571.2829;Inherit;False;Property;_Color1;Color 1;2;1;[HDR];Create;True;0;0;False;0;False;0,0,0,0;0.6418176,1.310947,2.608238,1;True;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  60. Node;AmplifyShaderEditor.LerpOp;20;3811.979,549.4662;Inherit;False;3;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0;False;1;COLOR;0
  61. Node;AmplifyShaderEditor.SaturateNode;23;3969.981,554.9569;Inherit;False;1;0;COLOR;0,0,0,0;False;1;COLOR;0
  62. Node;AmplifyShaderEditor.VertexColorNode;103;3809.952,331.989;Inherit;False;0;5;COLOR;0;FLOAT;1;FLOAT;2;FLOAT;3;FLOAT;4
  63. Node;AmplifyShaderEditor.ComponentMaskNode;145;4059.892,793.064;Inherit;False;False;False;False;True;1;0;COLOR;0,0,0,0;False;1;FLOAT;0
  64. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;104;4232.218,511.9019;Inherit;False;2;2;0;COLOR;0,0,0,0;False;1;COLOR;0,0,0,0;False;1;COLOR;0
  65. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;144;4287.432,751.4012;Inherit;False;2;2;0;FLOAT;0;False;1;FLOAT;0;False;1;FLOAT;0
  66. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;110;4629.251,581.9988;Float;False;True;-1;2;ASEMaterialInspector;0;0;Unlit;RO/RO_Effect_Fresnel_01;False;False;False;False;True;True;True;True;True;False;True;True;False;False;False;False;False;False;False;False;False;Back;2;False;-1;3;False;-1;False;0;False;-1;0;False;-1;False;0;Custom;0.5;True;False;0;True;Custom;;Transparent;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;2;15;10;25;False;0.5;False;2;5;False;-1;10;False;-1;0;0;False;-1;0;False;-1;0;False;-1;0;False;-1;0;False;0;0,0,0,0;VertexOffset;True;False;Cylindrical;False;Relative;0;;0;-1;-1;-1;0;False;0;0;False;-1;-1;0;False;-1;0;0;0;False;0.1;False;-1;0;False;-1;15;0;FLOAT3;0,0,0;False;1;FLOAT3;0,0,0;False;2;FLOAT3;0,0,0;False;3;FLOAT;0;False;4;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
  67. WireConnection;16;3;99;1
  68. WireConnection;143;0;16;0
  69. WireConnection;19;0;143;0
  70. WireConnection;19;1;99;2
  71. WireConnection;20;0;21;0
  72. WireConnection;20;1;22;0
  73. WireConnection;20;2;19;0
  74. WireConnection;23;0;20;0
  75. WireConnection;145;0;23;0
  76. WireConnection;104;0;103;0
  77. WireConnection;104;1;23;0
  78. WireConnection;144;0;103;4
  79. WireConnection;144;1;145;0
  80. WireConnection;110;2;104;0
  81. WireConnection;110;9;144;0
  82. ASEEND*/
  83. //CHKSM=04E3ADDDF6C57FD7E187596F939A39A187270E51