varying vec2 texC;
uniform sampler2D tex1;
uniform sampler2D tex2;
uniform float mixBoost;
uniform float specBoost;
uniform float distBoost;
void main()
{


vec2 texCForWarpy = texC;

texCForWarpy*=0.5f;
texCForWarpy-=vec2(0.5f,0.75f);

texC.x*=2.0f;
texC.y = 1.0f - texC.y;

vec4 colSample = texture2D(tex1,texCForWarpy);
float light = colSample.r +  colSample.g + colSample.b;
light*=0.3333;
float spec = pow(clamp(light,0.0,1.0),2.4);
vec2 texMod = texC;
float modder = 0.05;
texMod+=(colSample.rg*2.0 - vec2(1.0))*(modder + distBoost);
texMod+=vec2(modder + distBoost);
//texMod.x*=2.0f;
vec4 colScheme = texture2D(tex2,texMod);


gl_FragColor = vec4(colScheme*(0.1+ light)) + vec4(spec);

vec3 colToMix = (1.0 - vec3(1.0,0.6,0.2))*light;
colToMix =  colScheme.rgb - colToMix*(0.3f + mixBoost);
gl_FragColor = vec4(colToMix + spec*(0.2f + specBoost),1.0);
}