I have a fragment shader:

```
void main(void) {
vec2 st = gl_TexCoord[0].st; // Get Coordinate
vec2 offset = vec2(0);
vec3 sample = vec3(0); // Declare a sample to hold the convolution matrix sample
int i;
int j;
for (i == 0; i < 5; i++)
{
for (j == 0; j < 5; j++)
{
offset = vec2(i-16,j-16);
sample += texture2DRect(source, st+offset).rgba*(1./5);
}
}
gl_FragColor = vec4(sample,1.); // Update Pixel
}
```

And it will run the j loop (5 samples) but it only returns i == static. If I pass offset as j,j it’ll obviously blur as a diagonal. Can you not perform nested loops in OpenGL? It’s also clearly only running the last loop since I have to divide the sample intensity by 5 not 25. Any help would be appreciated.