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.

64 lines
3.6 KiB

  1. // Made with Amplify Shader Editor
  2. // Available at the Unity Asset Store - http://u3d.as/y3X
  3. Shader "ASESampleShaders/ScreenSpaceDetail"
  4. {
  5. Properties
  6. {
  7. _Checkers("Checkers", 2D) = "white" {}
  8. _Albedo("Albedo", 2D) = "white" {}
  9. [HideInInspector] _texcoord( "", 2D ) = "white" {}
  10. [HideInInspector] __dirty( "", Int ) = 1
  11. }
  12. SubShader
  13. {
  14. Tags{ "RenderType" = "Opaque" "Queue" = "Geometry+0" }
  15. Cull Back
  16. CGPROGRAM
  17. #pragma target 3.0
  18. #pragma surface surf Standard keepalpha addshadow fullforwardshadows
  19. struct Input
  20. {
  21. float2 uv_texcoord;
  22. float4 screenPos;
  23. };
  24. uniform sampler2D _Albedo;
  25. uniform float4 _Albedo_ST;
  26. uniform sampler2D _Checkers;
  27. void surf( Input i , inout SurfaceOutputStandard o )
  28. {
  29. float2 uv_Albedo = i.uv_texcoord * _Albedo_ST.xy + _Albedo_ST.zw;
  30. float4 ase_screenPos = float4( i.screenPos.xyz , i.screenPos.w + 0.00000000001 );
  31. float4 ase_screenPosNorm = ase_screenPos / ase_screenPos.w;
  32. ase_screenPosNorm.z = ( UNITY_NEAR_CLIP_VALUE >= 0 ) ? ase_screenPosNorm.z : ase_screenPosNorm.z * 0.5 + 0.5;
  33. o.Albedo = ( tex2D( _Albedo, uv_Albedo ) * tex2D( _Checkers, ( (ase_screenPosNorm).xy * float2( 8,6 ) ) ) ).rgb;
  34. o.Alpha = 1;
  35. }
  36. ENDCG
  37. }
  38. Fallback "Diffuse"
  39. CustomEditor "ASEMaterialInspector"
  40. }
  41. /*ASEBEGIN
  42. Version=13803
  43. 566;511;900;507;1889.303;488.211;2.380328;True;False
  44. Node;AmplifyShaderEditor.ScreenPosInputsNode;4;-1248,144;Float;False;0;False;0;5;FLOAT4;FLOAT;FLOAT;FLOAT;FLOAT
  45. Node;AmplifyShaderEditor.ComponentMaskNode;6;-992,144;Float;False;True;True;False;False;1;0;FLOAT4;0,0,0,0;False;1;FLOAT2
  46. Node;AmplifyShaderEditor.Vector2Node;10;-992,272;Float;False;Constant;_Vector0;Vector 0;-1;0;8,6;0;3;FLOAT2;FLOAT;FLOAT
  47. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;9;-720,144;Float;False;2;2;0;FLOAT2;0.0;False;1;FLOAT2;0.0;False;1;FLOAT2
  48. Node;AmplifyShaderEditor.SamplerNode;2;-544,128;Float;True;Property;_Checkers;Checkers;0;0;None;True;0;False;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
  49. Node;AmplifyShaderEditor.SamplerNode;1;-537.3115,-80;Float;True;Property;_Albedo;Albedo;1;0;None;True;0;True;white;Auto;False;Object;-1;Auto;Texture2D;6;0;SAMPLER2D;;False;1;FLOAT2;0,0;False;2;FLOAT;0.0;False;3;FLOAT2;0,0;False;4;FLOAT2;0,0;False;5;FLOAT;1.0;False;5;COLOR;FLOAT;FLOAT;FLOAT;FLOAT
  50. Node;AmplifyShaderEditor.SimpleMultiplyOpNode;8;-192,32;Float;False;2;2;0;COLOR;0.0;False;1;COLOR;0.0,0,0,0;False;1;COLOR
  51. Node;AmplifyShaderEditor.StandardSurfaceOutputNode;0;0,0;Float;False;True;2;Float;ASEMaterialInspector;0;0;Standard;ASESampleShaders/ScreenSpaceDetail;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;False;Back;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;2;15;10;25;False;0.5;True;0;Zero;Zero;0;Zero;Zero;OFF;OFF;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;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;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;False;14;FLOAT4;0,0,0,0;False;15;FLOAT3;0,0,0;False;0
  52. WireConnection;6;0;4;0
  53. WireConnection;9;0;6;0
  54. WireConnection;9;1;10;0
  55. WireConnection;2;1;9;0
  56. WireConnection;8;0;1;0
  57. WireConnection;8;1;2;0
  58. WireConnection;0;0;8;0
  59. ASEEND*/
  60. //CHKSM=2A1B86E7D8CEE3F5E914A651B615D1507F2FDA3F