uniform sampler2D Map1, Map2, ColMap;
uniform float Merge, Frequency;
uniform vec2 Mov1, Mov2;

void main( void )
{
   float theIndex = sin( Frequency *  ( ( (1.0 - Merge) *(texture2D( Map1, gl_TexCoord[0].st + Mov1) - 0.5) 
                                            + Merge * (texture2D( Map2, gl_TexCoord[0].st + Mov2 ) - 0.5) )  ) );
                            
   theIndex = (theIndex + 1.0) / 2.0;
    gl_FragColor = texture2D( ColMap, vec2( theIndex, 0) );    
}