armory/raw/forward/shadowmap.frag.glsl

28 lines
494 B
Plaintext
Raw Normal View History

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-08-25 00:26:01 +02:00
#ifdef _NorTex
#define _BaseTex
2015-12-17 20:07:23 +01:00
#endif
2016-08-07 01:43:21 +02:00
// in vec4 position;
2016-08-13 20:38:45 +02:00
out vec4 outColor;
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);
2016-08-13 20:38:45 +02:00
outColor = 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
}