# error C6013: Only arrays of texcoords may be indexed in this profile, and only wit

This topic is 3416 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Getting an error in my GLSL frag shader....
(49) : error C6013: Only arrays of texcoords may be indexed in this profile, and only with a loop index variable
which corresponds to this shader code:

varying vec4 indices;

uniform float data[5];

main()
{
(snip)
// get material emissivity
int nIndex = int(indices.r);
float dataPt = data[nIndex];
(/snip)
}

I am wondering the problem is that nIndex is not constant at compile time. Can I not calculate the index for the uniform array lookup at run time? Do I need to convert this to a 1D texture? Thanks, CB

##### Share on other sites
Some GPUs don't support indexing in the FS. Yes, use a texture instead.

• 10
• 18
• 14
• 18
• 15