moooaaarrr work on triangles ... still nothing

This commit is contained in:
Stefan Dresselhaus
2014-01-04 02:45:13 +01:00
parent a2c1effb48
commit 7db4bff2e4
6 changed files with 42 additions and 14 deletions

View File

@ -3,11 +3,10 @@
//color from earlier stages
smooth in vec4 fg_SmoothColor;
//color of pixel
out vec4 fg_FragColor;
void main(void)
{
//copy-shader
fg_FragColor = fg_SmoothColor;
fg_FragColor = vec4(1,0,0,1) + 0.01* fg_SmoothColor;
}

View File

@ -9,12 +9,12 @@ in vec3 fg_VertexIn;
in vec3 fg_Normal;
//output-data for later stages
smooth out vec4 fg_SmoothColor;
out vec4 fg_SmoothColor;
void main()
{
//transform vec3 into vec4, setting w to 1
vec4 fg_Vertex = vec4(fg_VertexIn, 1.0);
vec4 fg_Vertex = vec4(fg_VertexIn.x, fg_VertexIn.y+0.1, fg_VertexIn.z, 1.0);
fg_SmoothColor = fg_Color + 0.001* fg_Normal.xyzx;
gl_Position = fg_ProjectionMatrix * fg_Vertex;
}