I defined the texture like the following:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB32UI, 512, 312,
0, GL_RGB_INTEGER, GL_UNSIGNED_INT, triIndex);
so you see each color channel of a texel is of type unsigned int. However, when I sample the texture in the shader using the following statement:
uvec3 value;
value = texture(myTexture, index).rgb;
an error generated saying implicit cast from “vec3” to “uvec3”. What’s the problem here?