ah, ok. that explains why it would not work with GL_LUMINANCE.
using GL_R32UI gives me:
[ error ] ofGLUtils: ofGetGLFormatFromInternal(): unknown internal format 33334, returning GL_RGBA
[ error ] ofGLUtils: ofGetGlTypeFromInternal(): unknown internal format 33334, returning GL_UNSIGNED_BYTE
so i added the format in ofGetGLFormatFromInternal
so it returns GL_RED
for type GL_R32UI
and make ofGetGlTypeFromInternal
return GL_UNSIGNED_INT
for GL_R32UI
i'm unsure how to get the value out of the texture...
reading it like this:
vec4 val = texelFetch(tex, id); // <-- gives me vector of floats
uint r = uint(val.x); // <-- need to scale?? - val.x is 0
...gives me a value of 0