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
853 B

5 years ago
  1. Shader "Fog Volume/RT viewers/RT_FogVolumeR"
  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. #define green float4(0, 1,0,1)
  17. struct appdata
  18. {
  19. float4 vertex : POSITION;
  20. float2 uv : TEXCOORD0;
  21. };
  22. struct v2f
  23. {
  24. float2 uv : TEXCOORD0;
  25. float4 vertex : SV_POSITION;
  26. };
  27. sampler2D RT_FogVolumeR;
  28. float4 RT_FogVolumeR_ST;
  29. v2f vert (appdata v)
  30. {
  31. v2f o;
  32. o.vertex = UnityObjectToClipPos(v.vertex);
  33. o.uv = TRANSFORM_TEX(v.uv, RT_FogVolumeR);
  34. return o;
  35. }
  36. fixed4 frag (v2f i) : SV_Target
  37. {
  38. // sample the texture
  39. fixed4 col = tex2D(RT_FogVolumeR, i.uv)/**green*/;
  40. return col;
  41. }
  42. ENDCG
  43. }
  44. }
  45. }