#version 330
uniform sampler2D samplers[4];
in vec2 uv0;
flat in int vis0;
layout(location = 0) out vec4 out_g_worldNormalSpecPower;
layout(location = 1) out vec4 out_g_albedoSpecIntesity;
layout(location = 2) out vec4 out_g_unusedShadeless;
void main(){
//if(vis0 == 0) discard; //the optimization
vec4 difColor = vec4(1,0,0,1);
vec4 specColor = vec4(1,1,1,1);
float specularIntensity = 0.3;
difColor = texture2D(samplers[0], uv0);
if(difColor.a < 0.2) discard;
//out to g buffer
out_g_worldNormalSpecPower = vec4(0,1,0, 10.0);
out_g_albedoSpecIntesity = vec4(difColor.xyz, specularIntensity);
out_g_unusedShadeless = vec4(0,0,0,0);
}