2016-01-08 02:35:14 +00:00
|
|
|
in vec3 oc_Position;
|
|
|
|
in vec3 oc_Normal;
|
|
|
|
in vec2 oc_TexCoord;
|
2016-01-02 21:08:53 +00:00
|
|
|
|
2016-01-08 02:35:14 +00:00
|
|
|
out vec3 vtxNormal;
|
|
|
|
out vec2 texcoord;
|
2016-01-02 21:08:53 +00:00
|
|
|
|
2015-12-25 06:47:51 +00:00
|
|
|
uniform mat4 projectionMatrix;
|
|
|
|
uniform mat4 modelviewMatrix;
|
|
|
|
|
2014-12-03 15:47:33 +00:00
|
|
|
#ifndef OPENCLONK
|
|
|
|
#define slice(x)
|
2014-12-22 16:15:46 +00:00
|
|
|
|
2014-10-27 01:32:08 +00:00
|
|
|
void main()
|
2014-12-03 15:47:33 +00:00
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
|
|
|
slice(texcoord)
|
2014-10-27 01:32:08 +00:00
|
|
|
{
|
2016-01-02 21:08:53 +00:00
|
|
|
texcoord = oc_TexCoord;
|
2014-12-03 15:47:33 +00:00
|
|
|
}
|
|
|
|
|
2015-12-25 06:47:51 +00:00
|
|
|
slice(normal)
|
|
|
|
{
|
|
|
|
// Dummy variable, it's not used in the fragment shader.
|
2016-01-02 21:08:53 +00:00
|
|
|
// TODO: Improve construction of shaders so this is not needed,
|
|
|
|
// but it's probably optimized out anyway. Also, remove
|
|
|
|
// the oc_Normal attribute which is unused.
|
|
|
|
vtxNormal = vec3(0.0, 0.0, 0.0);
|
2015-12-25 06:47:51 +00:00
|
|
|
}
|
|
|
|
|
2014-12-03 15:47:33 +00:00
|
|
|
slice(position)
|
|
|
|
{
|
2016-01-02 21:08:53 +00:00
|
|
|
gl_Position = projectionMatrix * modelviewMatrix * vec4(oc_Position, 1.0);
|
2014-10-27 01:32:08 +00:00
|
|
|
}
|
2014-12-03 15:47:33 +00:00
|
|
|
|
|
|
|
#ifndef OPENCLONK
|
|
|
|
}
|
|
|
|
#endif
|