Hi,
I am experiencing a really weird GLSL bug. I have implemented point lights following this tutorial, but I get some strange artefacts and I narrowed them down to the following line in my fragment shader:
specularFactor = pow(specularFactor, matSpecularPower);
specularFactor is of type "highp float" and matSpecularPower is "uniform highp float" and set to 1.0 for debugging purposes. If I change the line to the following everything looks different and I don't have those black artefacts:
specularFactor = pow(specularFactor, 1.0);
Here are some screenshots:
How is this possible if matSpecular is also set to 1.0? And I am sure it is because I also get the first result if I change it to this:
if (matSpecularPower == 1.0) {
specularFactor = pow(specularFactor, matSpecularPower);
}
And the second result if I change it to this:
if (matSpecularPower == 1.0) {
specularFactor = pow(specularFactor, 1.0);
}
I am on Linux and have an Intel graphics card if that is important. Help, please! Even ideas of things I could try would be appreciated.