Been searching the forum but didnt find anything that describes my little problem.
Im reading texture coordinates from a texture. If I read from the texture in the vertex shader everything is ok.
Except that the performance drop makes the program useless :sorrow:.
If I move the lookup to the fragment shader performance is good, but the texture coordinates is totally screwed.
I set up the lookup texture with filters set to GL_NEAREST, so there should be no filtering.
This is the texture creation I use:
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,GL_CLAMP_TO_EDGE);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,GL_CLAMP_TO_EDGE);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,GL_NEAREST);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,GL_NEAREST);
glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE,GL_MODULATE);
Im probably missing something silly as usual, but please enlighten me :D.