   Weird GLSL error
  Hi, I am running a following shader on FireGL 5700 (Radeon 3650):#version 130uniform sampler2D tex;in vec3 VertexNormal;in vec3 VertexPosition;uniform vec4 MaterialAmbient;uniform vec4 MaterialDiffuse;uniform vec4 MaterialSpecular;uniform vec3 PointLightPos[8];uniform vec4 PointLightColor[8];uniform float PointLightRange[8];uniform int PointLightNum;uniform vec3 DirectionalLightDir[8];uniform vec4 DirectionalLightColor[8];uniform int DirectionalLightNum;uniform vec4 Ambient;void main(){vec3 Normal = normalize(VertexNormal);// bo jest interpolowane...if(PointLightNum + DirectionalLightNum == 0)gl_FragColor = vec4(0,0,0,1);else{vec4 finalColor = vec4(0,0,0,0);float intensity = 0;for(int i = 0; i < PointLightNum; i++){float range = length(PointLightRange * vec4(1,0,0,0));vec3 lightVec = PointLightPos - VertexPosition;float scale = clamp(1 - length(lightVec)/range, 0.0, 1.0);lightVec = normalize(lightVec);float miDiff;if(dot(lightVec, Normal) > 0)miDiff = 1;elsemiDiff = 0;//intensity = clamp((dot(lightVec, Normal) * scale), 0.0, 1.0); //scale tu czy na zewnatrzintensity = clamp((dot(lightVec, Normal)), 0.0, 1.0);finalColor = max(miDiff * MaterialDiffuse * PointLightColor*scale*intensity, finalColor);// diffusefinalColor = max(MaterialSpecular * PointLightColor * intensity * scale, finalColor);// diffuse}for(int i = DirectionalLightNum-1; i>=0; i--){//if(i >= DirectionalLightNum) break;intensity = clamp((dot(normalize(-DirectionalLightDir), Normal)), 0.0, 1.0);//finalColor = max(finalColor, DirectionalLightColor * intensity);float miDiff;if(-dot(DirectionalLightDir, Normal) > 0)miDiff = 1;elsemiDiff = 0;finalColor = max(miDiff * MaterialDiffuse * DirectionalLightColor, finalColor);// diffusefinalColor = max(MaterialSpecular * DirectionalLightColor * intensity, finalColor);// diffuse}finalColor = max(Ambient * MaterialAmbient, finalColor);gl_FragColor = min(finalColor, texture(tex, gl_TexCoord[0].st));/*if(DirectionalLightNum == 2)gl_FragColor = vec4(0.25, 0.25,0.25,.5);else if(DirectionalLightNum < 2)gl_FragColor = vec4(1,0.,0.,.5);elsegl_FragColor = vec4(0., 1,0.,.5);*/}}At the scene we have 2 directional lights. As you see, we tried to debug, and yes, DirectionalLightNum is passed correctly (equals two). Now: if in second loop we hardcode "i = 1" or "for(int i = 0 ; i < 2; i++)" everything works fine. But when we use DirectionalLightNum, screen remains black.Does anybody know a workaround?Regards,akuda