Saxum/Shader/depth.fsh
2015-02-04 14:27:41 +01:00

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;
}