How will it be when in glTexImage2D I choose different internal format from how I sample it in shader?

Viewed 255

For example, I write this in code:

glTexImage2D(GL_TEXTURE_2D, i, GL_RGB, width, height, 0, GL_RGB, GL_UNSIGNED_BYTE, data);

and in shader:

glFragColor = texture2D(sampler, uv).rgba

what will happen, is there official definition for this situation?

1 Answers
Related