2014-01-11 17:57:48 -05:00
|
|
|
uniform mat4 ModelViewProjectionMatrix;
|
2014-01-12 10:27:24 -05:00
|
|
|
uniform mat4 TransposeInverseModelView;
|
2014-01-11 17:57:48 -05:00
|
|
|
|
2014-02-28 11:29:05 -05:00
|
|
|
#if __VERSION__ >= 130
|
2014-01-11 17:57:48 -05:00
|
|
|
in vec3 Position;
|
2014-01-12 10:27:24 -05:00
|
|
|
in vec3 Normal;
|
2014-02-28 11:29:05 -05:00
|
|
|
out vec3 nor;
|
|
|
|
#else
|
|
|
|
attribute vec3 Position;
|
|
|
|
attribute vec3 Normal;
|
|
|
|
varying vec3 nor;
|
|
|
|
#endif
|
|
|
|
|
2014-01-11 17:57:48 -05:00
|
|
|
|
|
|
|
void main(void)
|
|
|
|
{
|
|
|
|
gl_Position = ModelViewProjectionMatrix * vec4(Position, 1.);
|
2014-01-12 10:27:24 -05:00
|
|
|
nor = (TransposeInverseModelView * vec4(Normal, 0.)).xyz;
|
2014-01-11 17:57:48 -05:00
|
|
|
}
|