#version 450

layout(push_constant) uniform PushConstant {
    mat4 proj;
    mat4 view;
    mat4 model;
    vec4 lightPos;
} pc;

layout(location = 0) in vec3 fragWorldPos;

const float SHADOW_MAP_FAR_PLANE = 25.0;

void main() {
    gl_FragDepth = length(fragWorldPos - pc.lightPos.xyz) / SHADOW_MAP_FAR_PLANE;
}
