#version 300 es
precision mediump int;
precision mediump float;

in vec3 oViewPos;
    
out vec4 oColor;
    
uniform float cFarDistance;

void main()
{
    float depth = length(oViewPos) / cFarDistance;
    oColor = vec4(depth, depth, depth, 1.0);
}
