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.

57 lines
2.6 KiB

  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "ASESampleShaders/LocalGradient"
  4. {
  5. Properties
  6. {
  7. [HideInInspector] __dirty( "", Int ) = 1
  8. _Top("Top", Color) = (0,0,0,0)
  9. _Bottom("Bottom", Color) = (0,0,0,0)
  10. }
  11. SubShader
  12. {
  13. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
  14. Cull Back
  15. ZTest LEqual
  16. CGPROGRAM
  17. #include "UnityShaderVariables.cginc"
  18. #pragma target 3.0
  19. #pragma surface surf Standard keepalpha addshadow fullforwardshadows
  20. struct Input
  21. {
  22. float3 worldPos;
  23. };
  24. uniform fixed4 _Bottom;
  25. uniform fixed4 _Top;
  26. void surf( Input i , inout SurfaceOutputStandard o )
  27. {
  28. float3 ase_vertex3Pos = mul( unity_WorldToObject, float4( i.worldPos , 1 ) );
  29. float4 lerpResult3 = lerp( _Bottom , _Top , saturate( ase_vertex3Pos.z ));
  30. o.Albedo = lerpResult3.rgb;
  31. o.Alpha = 1;
  32. }
  33. ENDCG
  34. }
  35. Fallback "Diffuse"
  36. CustomEditor "ASEMaterialInspector"
  37. }
  38. /*ASEBEGIN
  39. Version=12003
  40. 0;92;1541;926;1046.299;287.4004;1.1;False;False
  41. Node;AmplifyShaderEditor.PosVertexDataNode;2;-600.1002,171.7;Float;False;0;0;5;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT
  42. Node;AmplifyShaderEditor.ColorNode;1;-533.7999,-30.2;Float;False;Property;_Top;Top;-1;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
  43. Node;AmplifyShaderEditor.SaturateNode;11;-369.3995,167.6996;Float;False;1;0;FLOAT;0.0;False;1;FLOAT
  44. Node;AmplifyShaderEditor.ColorNode;4;-542.8,-201.1001;Float;False;Property;_Bottom;Bottom;-1;0;0,0,0,0;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
  45. Node;AmplifyShaderEditor.LerpOp;3;-220.5998,44.29988;Float;False;3;0;COLOR;0.0,0,0,0;False;1;COLOR;0,0,0,0;False;2;FLOAT;0.0;False;1;COLOR
  46. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;0,0;Fixed;False;True;2;Fixed;ASEMaterialInspector;0;Standard;ASESampleShaders/LocalGradient;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;0;3;False;0;0;Opaque;0.5;True;True;0;False;Opaque;Geometry;All;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;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;15;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;5;FLOAT;0.0;False;6;FLOAT3;0,0,0;False;7;FLOAT3;0.0,0,0;False;8;FLOAT;0.0;False;9;FLOAT;0.0;False;10;OBJECT;0.0;False;11;FLOAT3;0.0,0,0;False;12;FLOAT3;0.0,0,0;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
  47. WireConnection;11;0;2;3
  48. WireConnection;3;0;4;0
  49. WireConnection;3;1;1;0
  50. WireConnection;3;2;11;0
  51. WireConnection;0;0;3;0
  52. ASEEND*/
  53. //CHKSM=398795A49E7F13CA039E3BA78C73BFDD4F28A1F9