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.

56 lines
861 B

5 years ago
  1. Shader "Fog Volume/RT viewers/RT_FogVolumeUniform"
  2. {
  3. Properties{
  4. _MainTex("Base", 2D) = "" {}
  5. }
  6. SubShader
  7. {
  8. Tags { "RenderType"="Opaque" }
  9. LOD 100
  10. Pass
  11. {
  12. CGPROGRAM
  13. #pragma vertex vert
  14. #pragma fragment frag
  15. #include "UnityCG.cginc"
  16. struct appdata
  17. {
  18. float4 vertex : POSITION;
  19. float2 uv : TEXCOORD0;
  20. };
  21. struct v2f
  22. {
  23. float2 uv : TEXCOORD0;
  24. float4 vertex : SV_POSITION;
  25. };
  26. sampler2D RT_FogVolumeConvolution;
  27. float4 RT_FogVolumeConvolution_ST;
  28. v2f vert (appdata v)
  29. {
  30. v2f o;
  31. o.vertex = UnityObjectToClipPos(v.vertex);
  32. o.uv = TRANSFORM_TEX(v.uv, RT_FogVolumeConvolution);
  33. return o;
  34. }
  35. fixed4 frag (v2f i) : SV_Target
  36. {
  37. // sample the texture
  38. fixed4 col = tex2D(RT_FogVolumeConvolution, i.uv).a;
  39. return col;
  40. }
  41. ENDCG
  42. }
  43. }
  44. }