gKit2 light
tuto5GL.glsl
1 
2 #version 330
3 
4 #ifdef VERTEX_SHADER
5 in vec3 position;
6 in vec2 texcoord;
7 
8 uniform mat4 mvpMatrix;
9 
10 out vec2 vertex_texcoord;
11 
12 void main( )
13 {
14  gl_Position= mvpMatrix * vec4(position, 1);
15  vertex_texcoord= texcoord;
16 }
17 #endif
18 
19 
20 #ifdef FRAGMENT_SHADER
21 
22 in vec2 vertex_texcoord;
23 
24 uniform sampler2D texture0;
25 
26 out vec4 fragment_color;
27 
28 void main( )
29 {
30  vec4 color= texture(texture0, vertex_texcoord);
31 
32  fragment_color= color;
33 }
34 #endif
vecteur generique, utilitaire.
Definition: vec.h:104
vecteur generique, utilitaire.
Definition: vec.h:94
vecteur generique 4d, ou 3d homogene, utilitaire.
Definition: vec.h:121