PostProcess.shader 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. Shader /*ase_name*/ "Hidden/Templates/Legacy/PostProcess" /*end*/
  2. {
  3. Properties
  4. {
  5. _MainTex ( "Screen", 2D ) = "black" {}
  6. /*ase_props*/
  7. }
  8. SubShader
  9. {
  10. Tags{ }
  11. ZTest Always
  12. Cull Off
  13. ZWrite Off
  14. /*ase_pass*/
  15. Pass
  16. {
  17. CGPROGRAM
  18. #pragma vertex vert_img_custom
  19. #pragma fragment frag
  20. #pragma target 3.5
  21. #include "UnityCG.cginc"
  22. /*ase_pragma*/
  23. struct appdata_img_custom
  24. {
  25. float4 vertex : POSITION;
  26. half2 texcoord : TEXCOORD0;
  27. /*ase_vdata:p=p;uv0=tc0*/
  28. };
  29. struct v2f_img_custom
  30. {
  31. float4 pos : SV_POSITION;
  32. half2 uv : TEXCOORD0;
  33. half2 stereoUV : TEXCOORD2;
  34. #if UNITY_UV_STARTS_AT_TOP
  35. half4 uv2 : TEXCOORD1;
  36. half4 stereoUV2 : TEXCOORD3;
  37. #endif
  38. /*ase_interp(4,):sp=sp.xyzw;uv0=tc0.xy;uv1=tc1;uv2=tc2;uv3=tc3*/
  39. };
  40. uniform sampler2D _MainTex;
  41. uniform half4 _MainTex_TexelSize;
  42. uniform half4 _MainTex_ST;
  43. /*ase_globals*/
  44. v2f_img_custom vert_img_custom ( appdata_img_custom v /*ase_vert_input*/ )
  45. {
  46. v2f_img_custom o;
  47. /*ase_vert_code:v=appdata_img_custom;o=v2f_img_custom*/
  48. o.pos = UnityObjectToClipPos( v.vertex );
  49. o.uv = float4( v.texcoord.xy, 1, 1 );
  50. #if UNITY_UV_STARTS_AT_TOP
  51. o.uv2 = float4( v.texcoord.xy, 1, 1 );
  52. o.stereoUV2 = UnityStereoScreenSpaceUVAdjust ( o.uv2, _MainTex_ST );
  53. if ( _MainTex_TexelSize.y < 0.0 )
  54. o.uv.y = 1.0 - o.uv.y;
  55. #endif
  56. o.stereoUV = UnityStereoScreenSpaceUVAdjust ( o.uv, _MainTex_ST );
  57. return o;
  58. }
  59. half4 frag ( v2f_img_custom i /*ase_frag_input*/) : SV_Target
  60. {
  61. #ifdef UNITY_UV_STARTS_AT_TOP
  62. half2 uv = i.uv2;
  63. half2 stereoUV = i.stereoUV2;
  64. #else
  65. half2 uv = i.uv;
  66. half2 stereoUV = i.stereoUV;
  67. #endif
  68. half4 finalColor;
  69. // ase common template code
  70. /*ase_frag_code:i=v2f_img_custom*/
  71. finalColor = /*ase_frag_out:Frag Color;Float4*/half4( 1, 1, 1, 1 )/*end*/;
  72. return finalColor;
  73. }
  74. ENDCG
  75. }
  76. }
  77. CustomEditor "AmplifyShaderEditor.MaterialInspector"
  78. }