2016-01-28 00:58:00 +01:00
|
|
|
#version 450
|
|
|
|
|
2015-12-17 20:07:23 +01:00
|
|
|
#ifdef GL_ES
|
|
|
|
precision mediump float;
|
|
|
|
#endif
|
|
|
|
|
2016-02-15 12:48:15 +01:00
|
|
|
#ifdef _NMTex
|
|
|
|
#define _AMTex
|
2015-12-17 20:07:23 +01:00
|
|
|
#endif
|
|
|
|
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec4 position;
|
2015-12-17 20:07:23 +01:00
|
|
|
|
2016-01-24 22:32:51 +01:00
|
|
|
void main() {
|
2015-12-17 20:07:23 +01:00
|
|
|
|
2016-04-20 23:11:25 +02:00
|
|
|
// float depth = position.z / position.w;
|
2016-03-11 15:07:41 +01:00
|
|
|
// depth += 0.005;
|
|
|
|
|
2016-03-22 23:35:54 +01:00
|
|
|
// gl_FragDepth = depth;
|
2016-04-20 23:11:25 +02:00
|
|
|
// gl_FragColor = vec4(depth, 0.0, 0.0, 1.0);
|
|
|
|
gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
2016-03-09 23:59:18 +01:00
|
|
|
|
|
|
|
// VSM
|
|
|
|
// float dx = dFdx(depth);
|
|
|
|
// float dy = dFdy(depth);
|
|
|
|
// gl_FragColor = vec4(depth, pow(depth, 2.0) + 0.25 * (dx * dx + dy * dy), 0.0, 1.0);
|
2015-12-17 20:07:23 +01:00
|
|
|
}
|