Strange problem in GLSL while assigning attribute to a varying in vertex shader

Hi All,

I am writing a GLSL program for texture mapping. I am having a weird problem. From my vertex shader I am trying to pass the texture coordinate vec2 as a varying to frag shader. In a diff shader in the same prog I did the same and it worked. But for this texture its not working. If I comment that line, then everything works. I have no clue why this is happening. Any help would be greately appreciated.

maybe you try to use more varyings as your GPU supports. MAX_VARYING_FLOATS can be as low as 32 in GL 2.1 (I assume you have to support very old versions of GL as you are still using 2.1 syntax). Check for those limits and check for shader link errors.

maybe you try to use more varyings as your GPU supports. MAX_VARYING_FLOATS can be as low as 32 in GL 2.1 (I assume you have to support very old versions of GL as you are still using 2.1 syntax). Check for those limits and check for shader link errors.

Hi Menzel,

You are absolutely right.. I was passing too many varying and I did not need all those, so I removed some of the unnecessary ones and all started showing up.. turned out that my GLSL version only supports 16 varying vectors and I was passing 17 of them.. that's why when I was just commenting that line, it was working.. thanks for the reply!!
This thread is solved