Setting up integer texture and binding as image When I set up a texture as float it works (color is written -  BTW I'm doing voxelization):

glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA32F, width, height, depth, 0, GL_RGBA,GL_FLOAT,NULL);


then setting filtering...

then binding:

glBindImageTexture(0, textureID, 0, GL_TRUE, 0, GL_READ_WRITE, GL_RGBA32F);


writing:

layout(rgba32f ,binding = 0) uniform image3D geometryGrid;
...
imageStore(geometryGrid, index, ivec4(1.0)); //ivec4 or vec4, it works


reading:

uniform sampler3D geometryTexture;
...
vec4 g = texture(geometryTexture, geomCoords);


But I want to use an integer texture (so in future I can do binary voxelization and bitwise operations - each bit = slice in z direction). I set it up like that:

glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, width, height, depth, 0, GL_RGBA, GL_INT, NULL);


then setting filtering...

then binding:

glBindImageTexture(0, textureID, 0, GL_TRUE, 0, GL_READ_WRITE, GL_RGBA32I);


writing:

layout(rgba32i ,binding = 0) uniform iimage3D geometryGrid;
...
imageStore(geometryGrid, index, ivec4(1.0));


reading (same as float):

uniform sampler3D geometryTexture;
...
vec4 g = texture(geometryTexture, geomCoords);


Then it's black. Whats wrong with that? There is sparse documentation about it. BTW The info that iimage is for integer texture, uimage is for unsigned int is actually nowhere to be found.
glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA, width, height, depth, 0, GL_RGBA, GL_INT, NULL);



This is not an integer image format. It's an unsigned, normalized, fixed-point image format. For those, you use floating-point image/sampler variables. So for a 3D texture, you would use image3D, not iimage3D.

If you want a true signed integer format, you would do this:

glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA32I, width, height, depth, 0, GL_RGBA_INTEGER, GL_INT, NULL);


Note two changes. First, the internal format is GL_RGBA32I, which specifies a 32-bit-per-channel signed integer format. The second is the use of GL_RGBA_INTEGER for the pixel transfer format. Even though you're not actually performing a pixel transfer (since you're passing NULL), you still must use an appropriate format and type. And the _INTEGER formats must be used if you're transferring to/from a texture with an integer format.

When you do this, you must of course use the iimage3D and isampler3D types in your shaders.