I accidently set my texture buffer format to GL_LUMINANCE instead of GL_LUMINANCE8. It would have been nice if the driver threw an error instead of giving me a bunch of 0s in the shader. Oh well.
Now I have another problem. I’m trying to access the buffer using a texture coordinate. Something like:
float val = texelFetch( buffer, int(texcoord.p)*stride + offset ).x;
Stride and offset are both integers. It sort of works, except I get some really nasty artifacts. It looks like z fighting. Is there something wrong with my code? Has anyone seen anything that looks like that?
Assuming I can get the texture buffer working, does anyone have performance numbers on texture buffers versus other texture types? (I’ve also coded it to work with texture arrays.)
Thanks in advance.