pioneers/shaders/vertex.shader

22 lines
496 B
Plaintext
Raw Normal View History

#version 330
//constant projection matrix
uniform mat4 fg_ProjectionMatrix;
2014-01-04 13:09:42 +00:00
uniform mat4 fg_ModelMatrix;
//vertex-data
2014-01-04 13:09:42 +00:00
in vec4 fg_Color;
in vec3 fg_VertexIn;
2014-01-04 01:53:12 +00:00
//in vec3 fg_Normal;
//output-data for later stages
2014-01-04 13:09:42 +00:00
smooth out vec4 fg_SmoothColor;
void main()
{
//transform vec3 into vec4, setting w to 1
vec4 fg_Vertex = vec4(fg_VertexIn, 1.0);
2014-01-04 13:09:42 +00:00
fg_SmoothColor = fg_Color;
// + 0.001* fg_Normal.xyzx;
gl_Position = fg_ProjectionMatrix * fg_ModelMatrix * fg_Vertex;
}