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.

61 lines
3.0 KiB

  1. // Upgrade NOTE: upgraded instancing buffer 'ASESampleShadersSimpleGPUInstancing' to new syntax.
  2. // Made with Amplify Shader Editor
  3. // Available at the Unity Asset Store - http://u3d.as/y3X
  4. Shader "ASESampleShaders/Simple/SimpleGPUInstancing"
  5. {
  6. Properties
  7. {
  8. [HideInInspector] __dirty( "", Int ) = 1
  9. _Color("Color", Color) = (1,1,1,1)
  10. _Checkers("Checkers", 2D) = "white" {}
  11. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  12. }
  13. SubShader
  14. {
  15. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
  16. Cull Back
  17. ZTest LEqual
  18. CGPROGRAM
  19. #pragma target 3.0
  20. #pragma multi_compile_instancing
  21. #pragma surface surf Standard keepalpha addshadow fullforwardshadows
  22. struct Input
  23. {
  24. float2 uv_texcoord;
  25. };
  26. uniform sampler2D _Checkers;
  27. uniform float4 _Checkers_ST;
  28. UNITY_INSTANCING_BUFFER_START(ASESampleShadersSimpleGPUInstancing)
  29. UNITY_DEFINE_INSTANCED_PROP(float4, _Color)
  30. #define _Color_arr ASESampleShadersSimpleGPUInstancing
  31. UNITY_INSTANCING_BUFFER_END(ASESampleShadersSimpleGPUInstancing)
  32. void surf( Input i , inout SurfaceOutputStandard o )
  33. {
  34. float2 uv_Checkers = i.uv_texcoord * _Checkers_ST.xy + _Checkers_ST.zw;
  35. float4 _Color_Instance = UNITY_ACCESS_INSTANCED_PROP(_Color_arr, _Color);
  36. o.Albedo = ( tex2D( _Checkers, uv_Checkers ) * _Color_Instance ).xyz;
  37. o.Alpha = 1;
  38. }
  39. ENDCG
  40. }
  41. Fallback "Diffuse"
  42. CustomEditor "ASEMaterialInspector"
  43. }
  44. /*ASEBEGIN
  45. Version=10011
  46. 412;100;931;639;773.5;230.5;1;True;False
  47. Node;AmplifyShaderEditor.SamplerNode;1;-518.5,-163.5;Float;True;Property;_Checkers;Checkers;1;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;0,0;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;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
  48. Node;AmplifyShaderEditor.ColorNode;2;-464.5,65.5;Float;False;InstancedProperty;_Color;Color;0;0;1,1,1,1;0;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
  49. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;3;-153.5,-50.5;Float;False;2;2;0;FLOAT4;0.0,0,0,0;False;1;COLOR;0.0,0,0,0;False;1;FLOAT4
  50. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;23,-97;Float;False;True;2;Float;ASEMaterialInspector;0;Standard;ASESampleShaders/Simple/SimpleGPUInstancing;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;Relative;0;;-1;-1;-1;-1;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;False;7;FLOAT3;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;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
  51. WireConnection;3;0;1;0
  52. WireConnection;3;1;2;0
  53. WireConnection;0;0;3;0
  54. ASEEND*/
  55. //CHKSM=4077B481F57EDCA19D5FBA4BF134CDDBF1D3C323