Multitexturing (3) problem with shader recompile.

I had two textures (diffuse map/normal map) with GLSL per-pixel lighting which works fine for a year now. I decided to add additional lightmap texture as a 3rd texture unit which seems to work fine but when i change anything in the shader runtime in GLIntercept and recompile (F7) it breaks on glDrawElements with GL_INVALID_VALUE (index count is 108). Before that, NO error occurs and i can’t figure out what the problem is. Can’t be multitexturing since 2 textures work fine. Can’t be multiple UV sets since i pack two sets into single one (xy, zw). If i remove the third texture2D sampler in the shader everything is back to normal. Any idea what that could be?

<GeForce 8600 GT (latest Omega)>

It would be nice to see the shader as well as it’s initialization code.

@Kavara: open a new thread.

@DmitryM: everything is initialized just fine and works if i have 2 sampler2D samplers in the shader. im beginning to think it’s not something im doing wrong. it only outputs error if i recompile the shader with GLIntercept and the produced string and error value make absolutely no sense. anyways, will continue digging, post the solution once i figure it out.

IIRC When I was using GLIntercept I would get some odd errors when adding uniforms. It was nothing todo with the actual shader, just some issue with GLIntercept.

Regards
elFarto

Thanks, i begin to think myself its GLIntercept. would like to know more on that, who discovered weird behavior and the results.