2016-01-28 00:58:00 +01:00
|
|
|
#version 450
|
|
|
|
|
2015-12-17 20:07:23 +01:00
|
|
|
#ifdef GL_ES
|
|
|
|
precision highp float;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef _NormalMapping
|
|
|
|
#define _Texturing
|
|
|
|
#endif
|
|
|
|
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec3 pos;
|
2015-12-17 20:07:23 +01:00
|
|
|
#ifdef _Texturing
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec2 tex;
|
2015-12-17 20:07:23 +01:00
|
|
|
#endif
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec3 nor;
|
2015-12-17 20:07:23 +01:00
|
|
|
#ifdef _VCols
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec4 col;
|
2015-12-17 20:07:23 +01:00
|
|
|
#endif
|
|
|
|
#ifdef _NormalMapping
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec3 tan;
|
|
|
|
in vec3 bitan;
|
2015-12-17 20:07:23 +01:00
|
|
|
#endif
|
|
|
|
#ifdef _Skinning
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec4 bone;
|
|
|
|
in vec4 weight;
|
2015-12-17 20:07:23 +01:00
|
|
|
#endif
|
|
|
|
#ifdef _Instancing
|
2016-01-28 00:58:00 +01:00
|
|
|
in vec3 off;
|
2015-12-17 20:07:23 +01:00
|
|
|
#endif
|
|
|
|
|
2016-02-07 23:03:52 +01:00
|
|
|
uniform mat4 LMVP;
|
2015-12-17 20:07:23 +01:00
|
|
|
|
2016-01-28 00:58:00 +01:00
|
|
|
out 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
|
|
|
#ifdef _Instancing
|
2016-02-07 23:03:52 +01:00
|
|
|
gl_Position = LMVP * vec4(pos + off, 1.0);
|
2015-12-17 20:07:23 +01:00
|
|
|
#else
|
2016-02-07 23:03:52 +01:00
|
|
|
gl_Position = LMVP * vec4(pos, 1.0);
|
2015-12-17 20:07:23 +01:00
|
|
|
#endif
|
|
|
|
position = gl_Position;
|
|
|
|
}
|