uniform sampler2D spheretexture;
uniform sampler2D colortexture;
uniform float fadealpha;
uniform float refrectrate;

void main(void)
{
	vec4 color = texture2D( colortexture, gl_TexCoord[0].st);
	vec4 env = texture2D( spheretexture, gl_TexCoord[1].st);
	vec4 vtx_color = gl_Color;

	vtx_color.a = 1.0;
	gl_FragColor = color + env * refrectrate * vtx_color * 1.4;
	gl_FragColor.a = gl_Color.a * gl_FragColor.a * fadealpha;
}
