In GLSL 4.2 one can use the image2D datatype with imageLoad and imageStore functions. those functions take ivec to determine which pixel to write/read. in order to calculate the proper ivec, i need to know the size of the image. But how do I retrieve this?
textureSize() seems to work only with samplers, not with images.
How to do it?