
uniform int curr_rendering_light;
uniform bool is_shadow;

in vec3 out_pos;
out vec4 col;

void main() {
    if(is_shadow && lights[curr_rendering_light].type == LIGHT_TYPE_POINT){
        gl_FragDepth = length(out_pos - lights[curr_rendering_light].pos) / lights[curr_rendering_light].far;
    } else {
        gl_FragDepth = gl_FragCoord.z;
    }
    col = vec4(1,0,0,1);
}
