struct previous
{
   uniform sampler2D texture;
   float2 tex_coord;
};

void main_vertex
(
   float4 position : POSITION,
   out float4 oPosition : POSITION,
   uniform float4x4 modelViewProj,
   float2 tex : TEXCOORD,
   out float2 oTex : TEXCOORD,

   previous PREV,
   out float2 oTex1 : TEXCOORD1
)
{
   oPosition = mul(modelViewProj, position);
   oTex = tex;
   oTex1 = PREV.tex_coord;
}

float4 main_fragment (float2 tex : TEXCOORD, float2 tex1 : TEXCOORD1, uniform sampler2D s0 : TEXUNIT0, previous PREV) : COLOR
{
   return saturate(1.1 * tex2D(s0, tex) - tex2D(PREV.texture, tex1));
}

