//
// Rain fragment shader
// PGR4-type rain
//

#include "atmosphere.cg"
#include "lighting.cg"

// Vertex to pixel shader structure
struct v2p
{
  float2 uv			: TEXCOORD0;
  //float4 color  : COLOR0;     // Clamped 0..1?
  float4 color  : TEXCOORD1;
};

void main(
  // In
  in v2p IN,

  // Out
  out float4 outColor : COLOR,
  // MRT support? Probably sends data to COLOR0 and COLOR1 if used
  
  // Constants
  uniform sampler2D baseMap : TEXUNIT0
)
{
  // Get rain/snow texture and modulate with alpha
  outColor=tex2D(baseMap,IN.uv)*IN.color;
}
