  // SUNSPOT PASS 2 FS
 
 uniform sampler2D sunspotTexture;
 uniform sampler2D firstPassTexture;
 uniform float screenWidth;
 uniform float screenHeight;
 varying vec2 fake_frag_coord; 
 
 void main()
 {
	vec2 textCoord = gl_TexCoord[0].st;
    vec4 sample = texture2D(sunspotTexture, textCoord );
	vec4 s1 = vec4(sample.rgba);
	
	vec2 coord2 = vec2(fake_frag_coord);
	//vec2 coord2 = vec2(0.0,0.0);
	vec2 c3 = vec2(gl_FragCoord.s / 512.0, gl_FragCoord.t / 512.0);
	vec4 sample2 = texture2D(firstPassTexture, c3);
	vec4 s2 = vec4(sample2.rgba);
	
	vec4 col = vec4(s1.r + s2.r, s1.g + s2.g, s1.b + s2.b, s1.a + s2.a);
	vec4 col2 = vec4((s1.r + s2.r) /2.0, (s1.g + s2.g) /2.0, (s1.b + s2.b) /2, (s1.a + s2.a) /2.0);
	
	if (s1.r + s2.r > 1.0)
	{
		gl_FragColor = col2;
	}
 }
 