2014-12-04 00:13:59 +00:00
|
|
|
#version 150
|
|
|
|
|
2015-01-31 19:02:23 +00:00
|
|
|
in vec4 fragPosition;
|
|
|
|
|
2015-02-04 13:27:41 +00:00
|
|
|
uniform float farPlane;
|
|
|
|
|
2015-02-02 18:58:16 +00:00
|
|
|
out float gl_FragDepth;
|
2014-12-04 00:13:59 +00:00
|
|
|
|
|
|
|
void main() {
|
2015-02-04 13:27:41 +00:00
|
|
|
gl_FragDepth = length(fragPosition)/farPlane;
|
2014-12-04 00:13:59 +00:00
|
|
|
}
|