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