Advertisement Jump to content
Sign in to follow this  
CelticDaddio

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

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

If you intended to correct an error in the post then please contact us.

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 this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!