2015-12-17 20:07:23 +01:00
|
|
|
#ifdef GL_ES
|
|
|
|
precision mediump float;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _NormalMapping
|
|
|
|
#define _Texturing
|
|
|
|
#endif
|
|
|
|
|
|
|
|
varying vec4 position;
|
|
|
|
|
2016-01-24 22:32:51 +01:00
|
|
|
void main() {
|
2015-12-17 20:07:23 +01:00
|
|
|
|
|
|
|
float normalizedDistance = position.z / position.w;
|
|
|
|
normalizedDistance += 0.005;
|
|
|
|
|
|
|
|
gl_FragColor = vec4(normalizedDistance, normalizedDistance, normalizedDistance, 1.0);
|
|
|
|
}
|