armory/Sources/Shaders/shadow_map_NormalMapping.vert.glsl

41 lines
632 B
Plaintext
Raw Normal View History

2015-12-03 14:38:33 +01:00
#define _NormalMapping
2015-12-03 02:36:18 +01:00
//--------------------------------------------------------
#ifdef GL_ES
precision highp float;
#endif
2015-12-03 14:38:33 +01:00
#ifdef _NormalMapping
#define _Texturing
#endif
2015-12-03 02:36:18 +01:00
attribute vec3 pos;
2015-12-03 14:38:33 +01:00
#ifdef _Texturing
2015-12-03 02:36:18 +01:00
attribute vec2 tex;
2015-12-03 14:38:33 +01:00
#endif
2015-12-03 02:36:18 +01:00
attribute vec3 nor;
2015-12-03 14:38:33 +01:00
#ifdef _VCols
2015-12-03 02:36:18 +01:00
attribute vec4 col;
2015-12-03 14:38:33 +01:00
#endif
#ifdef _NormalMapping
2015-12-03 02:36:18 +01:00
attribute vec3 tan;
attribute vec3 bitan;
2015-12-03 14:38:33 +01:00
#endif
#ifdef _Instancing
attribute vec3 off;
#endif
2015-12-03 02:36:18 +01:00
uniform mat4 lightMVP;
varying vec4 position;
void kore() {
2015-12-03 14:38:33 +01:00
#ifdef _Instancing
gl_Position = lightMVP * vec4(pos + off, 1.0);
#else
2015-12-03 02:36:18 +01:00
gl_Position = lightMVP * vec4(pos, 1.0);
2015-12-03 14:38:33 +01:00
#endif
2015-12-03 02:36:18 +01:00
position = gl_Position;
}