#version 450 core
// Purpose: Game point-light shadow fragment shader; writes normalized distance from the light.

in vec3 vWorldPos;

uniform vec3 uLightPosition;
uniform float uLightFar;

void main()
{
    gl_FragDepth = clamp(length(vWorldPos - uLightPosition) / max(uLightFar, 0.001), 0.0, 1.0);
}
