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.

78 lines
4.7 KiB

  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "ASESampleShaders/ShaderBallInterior"
  4. {
  5. Properties
  6. {
  7. _RubberDiffuse("RubberDiffuse", 2D) = "white" {}
  8. _RubberSpecular("RubberSpecular", 2D) = "white" {}
  9. _RubberNormal("RubberNormal", 2D) = "bump" {}
  10. _Smoothness("Smoothness", Float) = 0
  11. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  12. [HideInInspector] __dirty( "", Int ) = 1
  13. }
  14. SubShader
  15. {
  16. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
  17. Cull Off
  18. CGPROGRAM
  19. #pragma target 3.0
  20. #pragma surface surf StandardSpecular keepalpha addshadow fullforwardshadows
  21. struct Input
  22. {
  23. float2 uv_texcoord;
  24. fixed ASEVFace : VFACE;
  25. };
  26. uniform sampler2D _RubberNormal;
  27. uniform float4 _RubberNormal_ST;
  28. uniform sampler2D _RubberDiffuse;
  29. uniform float4 _RubberDiffuse_ST;
  30. uniform sampler2D _RubberSpecular;
  31. uniform float4 _RubberSpecular_ST;
  32. uniform float _Smoothness;
  33. void surf( Input i , inout SurfaceOutputStandardSpecular o )
  34. {
  35. float2 uv_RubberNormal = i.uv_texcoord * _RubberNormal_ST.xy + _RubberNormal_ST.zw;
  36. float3 tex2DNode3 = UnpackNormal( tex2D( _RubberNormal, uv_RubberNormal ) );
  37. float3 appendResult9 = (float3(tex2DNode3.xy , ( tex2DNode3.b * i.ASEVFace )));
  38. o.Normal = appendResult9;
  39. float2 uv_RubberDiffuse = i.uv_texcoord * _RubberDiffuse_ST.xy + _RubberDiffuse_ST.zw;
  40. o.Albedo = tex2D( _RubberDiffuse, uv_RubberDiffuse ).rgb;
  41. float2 uv_RubberSpecular = i.uv_texcoord * _RubberSpecular_ST.xy + _RubberSpecular_ST.zw;
  42. o.Specular = tex2D( _RubberSpecular, uv_RubberSpecular ).rgb;
  43. o.Smoothness = _Smoothness;
  44. o.Occlusion = 0.0;
  45. o.Alpha = 1;
  46. }
  47. ENDCG
  48. }
  49. Fallback "Diffuse"
  50. CustomEditor "ASEMaterialInspector"
  51. }
  52. /*ASEBEGIN
  53. Version=13803
  54. 566;511;900;507;1625.187;404.2766;1.8591;True;False
  55. Node;AmplifyShaderEditor.SamplerNode;3;-1122.051,-70.15266;Float;True;Property;_RubberNormal;RubberNormal;2;0;Assets/AmplifyShaderEditor/Examples/Assets/Textures/SceneTextures/RubberNormal.tif;True;0;True;bump;Auto;True;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;FLOAT3;FLOAT;FLOAT;FLOAT;FLOAT
  56. Node;AmplifyShaderEditor.FaceVariableNode;7;-800,64;Float;False;0;1;FLOAT
  57. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;8;-640,0;Float;False;2;2;0;FLOAT;0.0;False;1;FLOAT;0.0;False;1;FLOAT
  58. Node;AmplifyShaderEditor.DynamicAppendNode;9;-480,-64;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
  59. Node;AmplifyShaderEditor.SamplerNode;2;-640,128;Float;True;Property;_RubberSpecular;RubberSpecular;1;0;Assets/AmplifyShaderEditor/Examples/Assets/Textures/SceneTextures/RubberSpecular.tif;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
  60. Node;AmplifyShaderEditor.RangedFloatNode;4;-528,320;Float;False;Property;_Smoothness;Smoothness;3;0;0;0;0;0;1;FLOAT
  61. Node;AmplifyShaderEditor.RangedFloatNode;6;-496,400;Float;False;Constant;_Float0;Float 0;4;0;0;0;0;0;1;FLOAT
  62. Node;AmplifyShaderEditor.SamplerNode;1;-640,-256;Float;True;Property;_RubberDiffuse;RubberDiffuse;0;0;Assets/AmplifyShaderEditor/Examples/Assets/Textures/SceneTextures/RubberDiffuse.tif;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
  63. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;-192,0;Float;False;True;2;Float;ASEMaterialInspector;0;0;StandardSpecular;ASESampleShaders/ShaderBallInterior;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;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;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;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.0;False;5;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;13;FLOAT3;0,0,0;False;11;FLOAT3;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
  64. WireConnection;8;0;3;3
  65. WireConnection;8;1;7;0
  66. WireConnection;9;0;3;0
  67. WireConnection;9;2;8;0
  68. WireConnection;0;0;1;0
  69. WireConnection;0;1;9;0
  70. WireConnection;0;3;2;0
  71. WireConnection;0;4;4;0
  72. WireConnection;0;5;6;0
  73. ASEEND*/
  74. //CHKSM=4A5B1F9E7C85CF0487F1C7D77A06ACA22F9F0D08