gKit2 light
Loading...
Searching...
No Matches
tuto_storage_texture.glsl
Go to the documentation of this file.
1
3
4#version 430
5
6#ifdef VERTEX_SHADER
7
8in vec3 position;
9
10uniform mat4 mvpMatrix;
11
12void main( )
13{
14 gl_Position= mvpMatrix * vec4(position, 1);
15}
16#endif
17
18
19#ifdef FRAGMENT_SHADER
20
21#ifdef EARLY_TESTS
22layout(early_fragment_tests) in;
23#endif
24
25layout(binding= 0, r32ui) coherent uniform uimage2D image;
26
27out vec4 fragment_color;
28
29void main( )
30{
31 uint n= imageAtomicAdd(image, ivec2(gl_FragCoord.xy), 1) +1;
32 fragment_color= vec4(1, 0, 0, 1);
33}
34#endif
vecteur generique, utilitaire.
Definition vec.h:169
vecteur generique 4d, ou 3d homogene, utilitaire.
Definition vec.h:192