TRIANGLEEEEESS!!!!11!!

finally.
This commit is contained in:
Stefan Dresselhaus
2014-01-04 14:09:42 +01:00
parent 47de89ca39
commit fd4d2a0d14
5 changed files with 59 additions and 27 deletions

View File

@ -9,5 +9,5 @@ out vec4 fg_FragColor;
void main(void)
{
//copy-shader
fg_FragColor = vec4(0.5,0.5,0.5,1.0);//fg_SmoothColor;
fg_FragColor = fg_SmoothColor;
}

View File

@ -2,19 +2,21 @@
//constant projection matrix
uniform mat4 fg_ProjectionMatrix;
uniform mat4 fg_ModelMatrix;
//vertex-data
//in vec4 fg_Color;
in vec4 fg_Color;
in vec3 fg_VertexIn;
//in vec3 fg_Normal;
//output-data for later stages
//smooth out vec4 fg_SmoothColor;
smooth out vec4 fg_SmoothColor;
void main()
{
//transform vec3 into vec4, setting w to 1
vec4 fg_Vertex = vec4(fg_VertexIn, 1.0);
//fg_SmoothColor = fg_Color + 0.001* fg_Normal.xyzx;
gl_Position = fg_ProjectionMatrix * fg_Vertex;
fg_SmoothColor = fg_Color;
// + 0.001* fg_Normal.xyzx;
gl_Position = fg_ProjectionMatrix * fg_ModelMatrix * fg_Vertex;
}