Holy shit I found it.
So, back in august I already noticed issues with #Intel chips because of their older #GLSL version. The culprit was this bit (simplified):
```
for(int i = 0; i < NUM_SHADOW_CASCADES; i++)
CalculateShadow(_shadowMap[i]);
```
`_shadowMap` is a so-called texture sampler. GLSL 3.30 does not allow indexing texture samplers with non-constant values, so I had to unroll the loop like this:
```
CalculateShadow(_shadowMap[0]);
CalculateShadow(_shadowMap[1]);
CalculateShadow(_shadowMap[2]);
```
And now - as it turns out - this specific driver implementation also doesn't support passing a texture sampler as a function parameter, because it works totally fine when I do this:
```
CalculateShadow_0();
CalculateShadow_1();
CalculateShadow_2();
```
So I had to define three separate copies of the exact same function, just to access the different shadow maps. God fucking dammit Intel. At least TELL ME.
#OpenGL #GameDevelopment #Programming #GameProgramming #ShaderProgramming #Shaders #GPU #Drivers #Windows #GameDev