源战役客户端
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.

51 lines
1.1 KiB

пре 1 месец
  1. Shader "MyShader/Sky" {
  2. Properties {
  3. _Color ("Main Color", Color) = (1,1,1,1)
  4. _MainTex ("Base (RGB)", 2D) = "white" {}
  5. }
  6. SubShader {
  7. Tags { "Queue"="Transparent-50" "RenderType"="Opaque" }
  8. Blend SrcAlpha OneMinusSrcAlpha
  9. Fog { Mode off }
  10. Pass {
  11. CGPROGRAM
  12. #pragma vertex vert
  13. #pragma fragment frag
  14. #include "UnityCG.cginc"
  15. struct appdata_t {
  16. float4 vertex : POSITION;
  17. float2 texcoord : TEXCOORD0;
  18. };
  19. struct v2f {
  20. float4 vertex : SV_POSITION;
  21. float2 texcoord : TEXCOORD0;
  22. };
  23. sampler2D _MainTex;
  24. float4 _MainTex_ST;
  25. fixed4 _Color;
  26. v2f vert (appdata_t v)
  27. {
  28. v2f o;
  29. o.vertex = UnityObjectToClipPos(v.vertex);
  30. o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex);
  31. return o;
  32. }
  33. fixed4 frag (v2f i) : SV_Target
  34. {
  35. fixed4 col = tex2D(_MainTex, i.texcoord) * _Color;
  36. return col;
  37. }
  38. ENDCG
  39. }
  40. }
  41. }