12 lines
153 B
GLSL
12 lines
153 B
GLSL
#version 150
|
|
|
|
in vec4 fragPosition;
|
|
|
|
uniform float farPlane;
|
|
|
|
out float gl_FragDepth;
|
|
|
|
void main() {
|
|
gl_FragDepth = length(fragPosition)/farPlane;
|
|
}
|