gKit2 light
Toggle main menu visibility
Loading...
Searching...
No Matches
gkit2_tutos
tuto5GL_multi.glsl
Go to the documentation of this file.
1
3
4
#version 330
5
6
#ifdef VERTEX_SHADER
7
in
vec3
position;
8
in
vec2
texcoord;
9
10
uniform mat4 mvpMatrix;
11
12
out
vec2
vertex_texcoord;
13
14
void
main( )
15
{
16
gl_Position= mvpMatrix *
vec4
(position, 1);
17
vertex_texcoord= texcoord;
18
}
19
#endif
20
21
22
#ifdef FRAGMENT_SHADER
23
24
in
vec2
vertex_texcoord;
25
26
uniform sampler2D base_texture;
27
uniform sampler2D detail_texture;
28
29
out
vec4
fragment_color;
30
31
void
main( )
32
{
33
vec4
color= texture(base_texture, vertex_texcoord);
34
color= color * 0.5 + texture(detail_texture, vertex_texcoord) * 0.5;
35
36
fragment_color= color;
37
}
38
#endif
vec2
vecteur generique, utilitaire.
Definition
vec.h:152
vec3
vecteur generique, utilitaire.
Definition
vec.h:169
vec4
vecteur generique 4d, ou 3d homogene, utilitaire.
Definition
vec.h:192
Generated on
for gKit2 light by
1.17.0