uniform sampler2D texture;
uniform sampler2D detail;

void main()
{
    vec4 textureColor = texture2D(texture, gl_TexCoord[0].st);
	vec4 detailColor = texture2D(detail, gl_TexCoord[1].st);
	
	gl_FragColor = mix(textureColor,detailColor*gl_Color,0.5);
	gl_FragColor = detailColor*textureColor*gl_Color*2;
}