#version 330 core

//uniform mat4 depthMVP;

uniform sampler2D Texture1; // need

// Ouput data
//layout(location = 0) out float fragmentdepth;

void main(){
    
    vec4 color;
    color = texture2D(Texture1, gl_TexCoord[0].st);
    
    // Alpha channel threshhold: at which point transparent stuff should go into depth buffer in shadow pass
    if (color.a < 0.05) {
    	discard;
    }
    
    // Not really needed, OpenGL does it anyway
    //fragmentdepth = gl_FragCoord.z;
    
    // gl_FragColor = color; 
    
    gl_FragColor = vec4(0, 0, 0, color.a); // just alpha
    
}
